[SOLVED] Native bullet library not found

Over at Lightspeed Frontier we’ve switched to native bullet recently. So I’m trying to add the native libraries to the IntelliJ IDEA project. Easy enough, go to the libraries section and add the jars, right? Well no, it seems. jme3-bullet.jar was added no problem along with all the libs I was adding, while I had to manually point IDEA to jme3-bullet-native.jar and it still didn’t detect it as native libraries. Told it it’s native libs manually and it added it to the dependencies.
Now when I’m trying to run the project I get this:

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:162)
	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)

Not even adding the .so file to run directory did the trick. At this point I’m out of ideas.

Ubuntu 17.10, 64 bit (if it helps for anything)

do you use gradle/maven?

No, since I need to use some jars I was sent, in order to have exact same versions. Some of them are modified and not even in any repository. So it’s not really an option.

gradle allows you to trivially include local jars from the file system. I do it all the time.

then I think you can just debug the line:
(NativeLibraryLoader.java:593)
to understnad what you miss. :wink:

No thanks, I really dont want to go insane if there’s an easier option and no auto dependency management benefits.

1 Like

Ok. Just in case it wasn’t clear, it’s not turning off auto dependency management. You still have that for all of the other stuff. It’s just for stuff that isn’t in a maven repo anywhere, you can drop the jars in a local lib directory and let gradle suck that up, too.

Also, you can use bintray to share your libraries with friends :slight_smile: it’s very easy to use.

Yes, I understand that. I’m just not going to use gradle which introduces a crapton of Y U NO WORK moments if I don’t get the automatic downloading and such (because all my libs are local anyway).

Anything that has any connection with gradle should probably be forbidden by law to have “easy to use” label IMO.

If I remember that correctly you only need fileTree("libs/") in the dependencies, or file("libs/native.jar")

Soo… No idea how this worked, but updating to the latest version of IntelliJ and re-adding all the libraries seems to have fixed it. Now I have some other problems, but those aren’t IDE related.

Except if he doesn’t already use gradle… then he’s right that there is a learning curve and lots of potential WTF? moments.

Even if you start from one of the prebuilt templates it’s not free.

Adding the libraries once you have all of that is free, though. :slight_smile:

2 Likes

I have same problem.
I fixed this error by adding a file “bulletjme.dll”
%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

1 Like

That DLL is automatically extracted depending on the operating system. You circumvented the issue by adding it yourself, but it won’t work on other operating systems if you distribute your game.

look if ONE OF jme-lwjgl or jme-lwjgl3 package is added, not both.

What opportunity I have for extracting DLL automatically?

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

I guess you need to also add jme3-bullet-native to dependencies. :wink:

2 Likes

It works fine
Thanks)

1 Like

This may help in the future.

https://wiki.jmonkeyengine.org/jme3/maven.html

jme3-bullet - Physics support using native bullet, needs jme3-bullet-native or jme3-bullet-native-android (beta)

Only one version of jme3-jbullet OR jme3-bullet with a single “natives” library can be used.