[Solved] Java not finding native "bulletjme" at runtime

The sample code from Starting a JME3 application from the command line compiles fine, but when I try to run it, java can’t seem to find “bulletjme”. Wanted to see if someone could point me in the right direction. I’m on linux x86_64 and I’ve tried it with java 8 and java 11. Thanks.

`java -cp “…/lib/eventbus.jar:…/lib/j-ogg-all.jar:…/lib/jme3-lwjgl.jar:…/lib/jme3-bullet.jar:…/lib/jinput.jar:…/lib/lwjgl.jar:…/lib/stack-alloc.jar:…/lib/vecmath.jar:…/lib/xpp3.jar:…/lib/jme3-blender.jar:…/lib/jme3-core.jar:…/lib/jme3-desktop.jar:…/lib/jme3-jogg.jar:…/lib/jme3-plugins.jar:…/lib/jme3-terrain.jar:…/lib/jme3-testdata.jar:…/lib/jme3-niftygui.jar:…/lib/nifty-default-controls.jar:…/lib/nifty-examples.jar:…/lib/nifty-style-black.jar:…/lib/nifty.jar:.” mygame/HelloJME3
Aug 11, 2019 5:52:17 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-stable

  • Branch: HEAD
  • Git Hash: 8291d61
  • Build Date: 2019-07-13
    Exception in thread “main” java.lang.UnsatisfiedLinkError: The required native library ‘bulletjme’ was not found in the classpath via ‘native/linux/x86_64/libbulletjme.so’. Error message: no bulletjme in java.library.path
    at com.jme3.system.NativeLibraryLoader.loadNativeLibrary(NativeLibraryLoader.java:593)
    at com.jme3.system.JmeDesktopSystem.initialize(JmeDesktopSystem.java:348)
    at com.jme3.system.JmeDesktopSystem.newContext(JmeDesktopSystem.java:271)
    at com.jme3.system.JmeSystem.newContext(JmeSystem.java:159)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:461)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
    at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
    at mygame.HelloJME3.main(HelloJME3.java:13)
    `

JME has two implementations of Bullet: the official native bullet library, and the jBullet Java port. Both are accessed via the classes in jme3-bullet.jar, but you still need one of the implementation jars in your classpath - either jme3-bullet-native.jar or jme3-jbullet.jar.

1 Like

Thank you so much for the quick reply. That fixed it. Now it’s not finding some other library. I’m going to mess with it a while. Thanks again.

1 Like

I’m replying to myself in case someone else has the same issues.
I ended up having to add “jme3-bullet-native.jar” and “gson.jar” to the classpath to get the example to run.

1 Like

No problem at all - glad you were able to resolve your issue! :smiley:

You can mark your question as resolved by putting [SOLVED] at the beginning the title.

1 Like