After updating both jME and jME Physics from CVS and updating all the libraries in my path, I get the following error upon opening a previously-running-fine program:

WARNING: Failed to use physics implementation 'com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory' due to Exception/Error: java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at org.odejava.Odejava.getLibraryVersion(Odejava.java:140)
   at org.odejava.Odejava.<clinit>(Odejava.java:89)
   at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.getImplementationVersion(OdePhysicsSpace.java:210)
   at com.jmex.physics.PhysicsSpace.scanAvailableImplementations(PhysicsSpace.java:372)
   at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:339)
   at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:90)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at Core.main(Core.java:34)

Then after a few more lines

SEVERE: Exception in game loop
java.lang.IllegalStateException: No physics implementation was registered nor found!
   at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:347)
   at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:90)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at Core.main(Core.java:34)

Anyone know what this could be?


Edit: After running some other stuff, I discovered the class file versions are 50.0, and it wants 49.0. I'll see what I can find out from that.

Some jars seem to contain classes compiled with JDK1.6 and you are running JDK1.5. You can use JDK1.6 to fix this quickly. I will rebuild the jars with 1.5 asap.

I'm on OS X which doesnt have 1.6 out for it yet (you probably know how quickly apple release new versions, aka several years late), so i'll just wait for it to be fixed :slight_smile: (And just a note, I can recompile everything under eclipse except odejava, thats the only bit that needs rebuilding on your part).

Thanks for the quick response!


Ok, I replaced it.

Great, it's working now. Thanks a lot!


I have a similar error but it is more to do with java.lang.NoClassDefFoundError: org/odejava/Odejava

I have put the correct classpath for both jme and jmephysics as required by jme wiki in the vm options but it is not working and it keeps giving this error??

E.g. I am trying to work through physics tutorials - I tried to run them from jme-Physics_2 - tutorial folder and the files would run fine. But when I try copying them to other project and running them from there, I get this error. I understand the project cannot find path to org/odejava/Odejava but what am I doing wrong? The path I enter in VMoptions is the same as in the tutorials folder whose file run…Its frustrating the hell out of me and eating up lot of valuable time…

Kind Regards,


hawk2k8 said:

I have a similar error but it is more to do with java.lang.NoClassDefFoundError: org/odejava/Odejava

Well, then it's not very similar and does not belong into this thread :P

It seems the build path (and thus the classpath) is not correctly configured for the project you copy the files into. Make sure you have the required libraries and projects (ode impl of jME Physics in this case) in the build path of the project. Consider consulting the eclipse help or an eclipse tutorial.

Discussion about the NoClassDefFoundError should be continued in that topic.