Packaging and Deploying JME Applications

Hi all!

I'm using Eclipse IDE to develop a simple game that uses JME + JMEPhysics.

I've read the article, but i still can't make my game run as an standalone app.

So, what am i doing?

java -classpath jme/lib/lwjgl_util_applet.jar:jme/lib/lwjgl.jar:jme/lib/junit-4.1.jar:jme/lib/jinput.jar:jme/lib/jorbis-0.0.15.jar:jme/lib/jogg-0.0.7.jar:jme/target/jmetest-data-model.jar:jme/target/jme-collada.jar:jme/target/jme-gamestates.jar:jme/target/jme-font.jar:jme/target/jme-editors.jar:jme/target/jmetest-data-cursor.jar:jme/target/jmetest.jar:jme/target/jme-audio.jar:jme/target/jme-scene.jar:jme/target/jme-xml.jar:jme/target/jme-model.jar:jme/target/jme.jar:jme/target/jmetest-data-sound.jar:jme/target/jmetest-data-skybox1.jar:jme/target/jmetest-data-texture.jar:jme/target/jme-awt.jar:jme/target/jmetest-data-images.jar:jme/target/jme-terrain.jar:jme/target/jme-effects.jar:jmephysics/release/jme-physics.jar:ode/odejava-jni.jar -Djava.library.path=jme/lib:jmephysics/release/lib:ode/lib -jar CorraPelaSuaVida.jar

Where CorraPelaSuaVida.jar is cleary my app :P

And what i want?

First make it run without the libs in the jar, after, put all in one jar with pre-specified classpath :)

Thanks for helping :P

What kind of error are you getting?

I'm getting the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: com/jmex/physics/util/SimplePhysicsGame
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClassInternal(

But i've setted the correct classpath. I don't know what it could be.

Thanks :)

You are missing the jmephysics.jar fileā€¦ if you don't have it, you might have to create it yourself from your compiled files.

Nope, the jmephysics file is there. ( Take a better look at my first post )

The problem is that i can't specify java -jar plus -classpath. I ve to do it using the file.

I still having problems, but i'm getting there :slight_smile:

Why don't you just do it like this then:

java -cp all.jar;your.jar;jars.jar -Djava.library.path=blah your.main.Class


I've created and dir called lib at the same dir where the .jar is located. As well as i have specified libs in META-INF/ Then ran with the following command:

java -Djava.library.path=lib -jar CorraPelaSuaVida.jar

Thanks you all!