(Solved) Error: cannot access MotionState | Running JME3 Tests

Hello everyone, I have recently installed jMonkeyEngine3 SDK and I tried to Build and Run the JME3 Tests and this error occurred:
error: cannot access MotionState
getMotionState().applyTransform(spatial);
class file for com.bulletphysics.linearmath.MotionState not found

Can you help me? I am a beginner. Thanks.

1 Like

You probably need add bullet and bullet-native to your project’s library properties – and remove jbullet.

2 Likes

Where can I find ‘bullet’ and ‘bullet-native’ libraries?
And in my project libraries there is a ‘jme3-jbullet’ library not a ‘jbullet’ one.
Thank you.

2 Likes

Yes, remove this one. You can add the other two bullet libraries bullet and bullet-native under your project properties.

2 Likes

If you’re using the JME3 SDK, the libraries will be listed in the “Global Libraries” hierarchy of the “Add Library” dialog box, which you access by right-clicking on the project in Projects window, then selecting “Properties” in the popup menu, then selecting “Libraries” under “Categories”, then clicking on the “Add Library…” button.

The exact library names are “jme3-bullet” and “jme3-bullet-native”

2 Likes

Or you could edit jme3-jbullet library to add jbullet.jar as Runtime dependency.
Btw 3.0 is old, use 3.1

2 Likes

Thank you all guys! I removed the jme3-bullet library and added jme3-bullet and jme3-bullet-native libraries and it worked!

2 Likes