JBullet vs Native Bullet Error in Example

Hello. What is the state of JBullet? I just tried the example from JME3 and it works with native bullet but fails on JBullet.

Example tried: jmonkeyengine/TestBrickWall.java at master · jMonkeyEngine/jmonkeyengine · GitHub

JME3 version 3.2.4-stable

Error with JBullet:

Sep 02, 2020 10:19:27 AM com.jme3.bullet.BulletAppState startPhysicsOnExecutor
SEVERE: null
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: com/bulletphysics/collision/dispatch/CollisionConfiguration
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at com.jme3.bullet.BulletAppState.startPhysicsOnExecutor(BulletAppState.java:191)
    at com.jme3.bullet.BulletAppState.startPhysics(BulletAppState.java:241)
    at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:342)
    at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
    at com.anrisoftware.dwarfhustle.gamemap.renderer.TestBrickWall.simpleInitApp(TestBrickWall.java:86)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
    at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:475)
    at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:574)
    at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:423)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
    at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
    at com.anrisoftware.dwarfhustle.gamemap.renderer.TestBrickWall.main(TestBrickWall.java:78)
Caused by: java.lang.NoClassDefFoundError: com/bulletphysics/collision/dispatch/CollisionConfiguration
    at com.jme3.bullet.BulletAppState$1.call(BulletAppState.java:185)
    at com.jme3.bullet.BulletAppState$1.call(BulletAppState.java:182)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.bulletphysics.collision.dispatch.CollisionConfiguration
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 7 more

Sep 02, 2020 10:19:27 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[main,5,main]
java.lang.NoClassDefFoundError: com/bulletphysics/collision/dispatch/CollisionConfiguration
    at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:345)
    at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
    at com.anrisoftware.dwarfhustle.gamemap.renderer.TestBrickWall.simpleInitApp(TestBrickWall.java:86)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
    at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:475)
    at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:574)
    at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:423)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
    at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
    at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
    at com.anrisoftware.dwarfhustle.gamemap.renderer.TestBrickWall.main(TestBrickWall.java:78)
Caused by: java.lang.ClassNotFoundException: com.bulletphysics.collision.dispatch.CollisionConfiguration
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 11 more

I tested jme3-jbullet when I released v3.2.4 and v3.3.2 and didn’t find any major issues. Since the exceptions you’re seeing are NoClassDefFoundError and ClassNotFoundException, I suspect there’s something missing from the classpaths in your runtime environment.

1 Like

Anecdotally, non-native bullet worked for me last time I tried, too.

I run jbullet exclusively in my own bullet-using apps… but I also remember it working the last time I tried it in JME examples.

I think you need to provide these libraries for jme-jbullet to work.

1 Like

I see that all of those libraries are quite old. JBullet has Bullet 2.72 support, which is quite old. JBullet seems to be a dead project. Should I even bother with that?

What version of Bullet does JME package? I can’t find the version of the native Bullet library that you use.

1 Like

@sgold continued development of the bullet physics libraries in his Minie project.

It’s hoped to replace the bullet library at some point, but allows a faster release cycle with it being a non-internal library at this point. Virtually everyone that is aware of it uses it unless there’s a specific reason not to. It’s about as up to date as it can be.

2 Likes

jme3-jbullet-3.3.2-stable uses a fork of JBullet that’s not been touched in at least 4 years: GitHub - normen/jbullet: The jbullet implementation used in jMonkeyEngine 3

jme3-bullet-3.3.2-stable uses a snapshot of Bullet from 15 Nov 2019:
jmonkeyengine/gradle.properties at 1a05e3fc5f2f3a6a503aa22758f8c093e95777c5 · jMonkeyEngine/jmonkeyengine · GitHub

Minie-3.0.0 uses Bullet 2.89 (20 Dec 2019) with a handful of local changes.

Most of the differences between jme3-bullet and Minie are on the Java side, not the C++ side.

PS: I strongly advise you to use Minie, but as the maintainer I’m surely biased. Some folks swear by jme3-jbullet.

2 Likes