Group Admins

  • Avatar Image

Troubleshooting – Physics

Public Group active 2 days, 22 hours ago

Physics related problems

jme physics for JME 2.0 -> No physics implementation was registered nor found (19 posts / 0 Voices)

← Group Forum   Group Forum Directory
  • Avatar Image condeagustin said 1 year, 4 months ago:

    Hello everyone

    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.

    Agustin

  • Avatar Image Core-Dump said 1 year, 4 months ago:

    make sure -Djava.library.path is correctly set, i think you'll get that error if the .dll is not found

  • Avatar Image nymon said 1 year, 4 months ago:

    You'll need to use the odejava.jar if I'm not mistaken, not the odejava-jni.jar.

  • Avatar Image condeagustin said 1 year, 4 months ago:

    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.

    1. First you have to download the source from http://code.google.com/p/jmephysics/source/checkout with SVN

    2. 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

    3. 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.

    4. 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

    5. 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

    6. 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.

    Agustin
    condeagustin@hotmail.com

    Colombia, the best country!!

  • Avatar Image qubodup said 1 year, 3 months ago:

    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

    Thanks!

  • Avatar Image Core-Dump said 1 year, 3 months ago:

    the odejava-jni.jar and dll's / so's can be found here:
    http://code.google.com/p/jmephysics/source/browse/#svn/trunk/impl/ode/lib

  • Avatar Image qubodup said 1 year, 3 months ago:

    Core-Dump said:
    the odejava-jni.jar [...]

    odejava-jni.jar does not do the trick.. :(

  • Avatar Image Core-Dump said 1 year, 3 months ago:

    and you did set -Djava.library.path  to the path containing the native ode library ?

  • Avatar Image condeagustin said 1 year, 3 months ago:

    Hello

    I'm sorry for keep you waiting about the .jar. Here is the link where you can download it:
    http://www.box.net/shared/kkqyv530gn

    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

  • Avatar Image condeagustin said 1 year, 2 months ago:

    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

    Bye

  • Avatar Image qubodup said 1 year, 2 months ago:

    Core-Dump said:
    and you did set -Djava.library.path  to the path containing the native ode library ?

    No, but if I do, the game window doesn't even open (because it doesn't find lwjgl for some reason…)

    I simply run java -jar eva.jar, and in a subfolder called lib/ there are

    $ ls
    JPhysicsBuild.jar    gluegen-rt.dll        jinput-raw.dll  jogl_awt.dll      libodejava.jnilib  lwjgl.jar              swt.jar
    JavaAccessBridge.dll  gluegen-rt.jar        jinput.jar      jogl_cg.dll        libodejava.so      lwjgl_util.jar        xstream-1.3.1.jar
    OpenAL32.dll          jawtaccessbridge.dll  jogl.dll        jorbis-0.0.17.jar  libodejava64.so    lwjgl_util_applet.jar
    fenggui-jme2.jar      jinput-dx8.dll        jogl.jar        junit-4.1.jar      lwjgl.dll          odejava-jni.jar

    I'm on arch linux 64bit and get http://pastebin.com/f733857d3 :-|

  • Avatar Image Core-Dump said 1 year, 2 months ago:

    does that work ?

    java -jar -Djava.library.path=./lib -cp ./lib/* eva.jar

    instead of ./lib/*  you might list every single jar separated by ':'

  • Avatar Image Kiromba said 1 year, 1 month ago:

    condeagustin said:
    Hello

    I'm sorry for keep you waiting about the .jar. Here is the link where you can download it:
    http://www.box.net/shared/kkqyv530gn

    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?

  • Avatar Image condeagustin said 1 year, 1 month ago:

    Well you also need the odejava-jni.jar file. I uploaded that one too. With those 2 files the physics should work in JME 2.0

  • Avatar Image jaimmeister said 11 months, 3 weeks ago:

    hello guys
    i'm got an error here
    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)