I have a problem with the jme physics for JME 2.0. The story is as follows. I already downloaded from SVN the latest source code of jme physics from http://code.google.com/p/jmephysics/ and I succesfully compiled it. Then I took that generated .jar file and I added it as a lib for my test project that has some physics basic testing (a box falling, and it already works perfect with JME 1.0). Then I succesfully compiled this test project and I already added the -Djava.library.path="libnatives" where the latest (from the mentioned SVN) odejava.dll is located, and of course I also added the latest (from the mentioned SVN) odejava-jni.jar, and when I run it, in the line
setPhysicsSpace( PhysicsSpace.create() );
I get this runtime error:
22/04/2009 11:30:41 AM com.jmex.physics.PhysicsSpace scanAvailableImplementations
INFO: Physics implementation 'com.jmex.physics.impl.physx.PhysXSpace$PhysXFactory' not present.
22/04/2009 11:30:41 AM com.jmex.physics.PhysicsSpace scanAvailableImplementations
INFO: Physics implementation 'com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory' not present.
22/04/2009 11:30:41 AM com.jmex.physics.PhysicsSpace scanAvailableImplementations
INFO: Physics implementation 'com.jmex.physics.impl.joode.JoodePhysicsSpace$JoodeFactory' not present.
22/04/2009 11:30:41 AM com.jmex.physics.PhysicsSpace scanAvailableImplementations
INFO: Physics implementation 'com.jmex.physics.impl.jbullet.JBulletPhysicsSpace$JBulletFactory' not present.
22/04/2009 11:30:41 AM class prueba.HelloWorld start()
GRAVE: Exception in game loop
java.lang.IllegalStateException: No physics implementation was registered nor found!
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:348)
Can someone help me? I mean I have read a lot of forums about jme-physics for JME 2.0 and I have followed all those indications, so I don't know what is happening. Please help, I want jme physics to work with JME 2.0. Farewell.
Umm nope (nymon and Core-Dump) I already had that configured, so that was not the solution. Hey everyone, I finally solved this problem on my own and for those lost souls who suffered with this I'm going to explain the solution. For those others who are lazy and don't want to compile jme physics for JME 2.0 then you can email me and I'll send you the .jar or if there is an option to publish it on the internet I would do it without any prob.
Then you have to create a project of type class library in netbeans (I used this IDE). You can create it anywhere in your pc
Go to the downloaded source of step 1 and being on the root directory go to src and copy all its content and then paste it under the src folder of the project created in step 2.
Go to the downloaded source of step 1 and on the root dir go to impl/ode/src and copy all its content and then paste it under the src folder of the project created in step 2. If it asks to overwrite click on Yes everything
In the project of step 2, as a library (Add as a jar option in netbeans) add the odejava-jni.jar that already comes in svn/impl/ode/lib. And then with the same option add all the .jar libraries that come in the JME_2.0_Distribution.zip that you can download on http://code.google.com/p/jmonkeyengine/downloads/list
Compile the project succesfully and now you have your .jar for physics in JME 2.0 (my jar is called JME2Physics.jar!)
I was having that exception BECAUSE I didn't know I had to make step 4, I mean I wasn't including the source files for the IMPLEMENTATION!!! That is why the system never found any implementation of physics. And obviously don't forget that you have to add the -Djava.library.path for the natives and the odejava-jni.jar in the game/application that is going to use the JME2Physics.jar
Feel free for questions or suggestions. I hope this can help you. Farewell.
condeagustin said: For those others who are lazy and don't want to compile jme physics for JME 2.0 then you can email me and I'll send you the .jar or if there is an option to publish it on the internet I would do it without any prob.
I definitely am too lazy right now and would appreciate a odejava.jar :)
You can use https://www.box.net/ or http://www.mediafire.com/ .
I'm trying to test https://sourceforge.net/projects/projecteva/ and have the same problem "INFO: Physics implementation 'com.jmex.physics.impl.physx.PhysXSpace$PhysXFactory' not present." etc
The file is called JME2Physics.jar and the is the physics that works perfect with JME2.0. I even tested it on mac, linux and windows and the physics works perfectly :D. Farewell
Oh and this is the odejava-jni.jar that i’m using for JME 2.0 http://www.box.net/shared/ht9gynmgn3. If you need the native libs (for mac, windows and linux) for the physics to work in JME 2.0 just tell me and i will upload those too
The file is called JME2Physics.jar and the is the physics that works perfect with JME2.0. I even tested it on mac, linux and windows and the physics works perfectly :D. Farewell
Agustin
I tried to use this file and get the same error! There is another thing i have to do?
altough i've already download all condeagustin said
and configure like this
-Djava.library.path = ./lib/native
Sep 21, 2009 3:46:01 PM com.jmex.physics.PhysicsSpace scanAvailableImplementations
WARNING: Failed to use physics implementation 'com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory' due to Exception while creating factory: java.lang.VerifyError: class com.jmex.physics.PhysicsCollisionGeometry overrides final method findPick.(Lcom/jme/math/Ray;Lcom/jme/intersection/PickResults;)V
java.lang.VerifyError: class com.jmex.physics.PhysicsCollisionGeometry overrides final method findPick.(Lcom/jme/math/Ray;Lcom/jme/intersection/PickResults;)V
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.<init>(OdePhysicsSpace.java:173)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.jmex.physics.PhysicsSpace.scanAvailableImplementations(PhysicsSpace.java:366)
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:340)
at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:91)
at com.jme.app.BaseGame.start(BaseGame.java:70)
at main.Lesson1.main(Lesson1.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Sep 21, 2009 3:46:01 PM class main.Lesson1 start()
SEVERE: Exception in game loop
java.lang.IllegalStateException: No physics implementation was registered nor found!
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:348)
at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:91)
at com.jme.app.BaseGame.start(BaseGame.java:70)
at main.Lesson1.main(Lesson1.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
hello.. im new to jme physics.. im getting the same error as above.. i tried removing all d final methods .. still not working.. plz help :(
Please give more information. Are you using a 64bit windows system? If yes, you will have to open the Java Preferences and select 32bit Java as the preferred one, since ODE is compiled for 32bit only.
WARNING: Failed to use physics implementation ‘com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory’ due to Exception while creating factory: java.lang.VerifyError: class com.jmex.physics.PhysicsCollisionGeometry overrides final method findPick.(Lcom/jme/math/Ray;Lcom/jme/intersection/PickResults;)V
java.lang.VerifyError: class com.jmex.physics.PhysicsCollisionGeometry overrides final method findPick.(Lcom/jme/math/Ray;Lcom/jme/intersection/PickResults;)V
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
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$000(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:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.(OdePhysicsSpace.java:173)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.jmex.physics.PhysicsSpace.scanAvailableImplementations(PhysicsSpace.java:366)
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:340)
at com.jmex.physics.util.states.PhysicsGameState.(PhysicsGameState.java:48)
at com.jmedemos.stardust.gamestates.InGameState.(InGameState.java:125)
at com.jmedemos.stardust.core.Start.main(Start.java:96)