How to launch a jME game with a BATCH file


I would like to distribute my game and launch it with a BATCH file.

I made this BATCH file :

java -cp lib/jdom.jar;lib/jme.jar;lib/jme-awt.jar;lib/jme-collada.jar;lib/jme-editors.jar;lib/jme-effects.jar;lib/jme-font.jar;lib/jme-gamestates.jar;lib/jme-model.jar;lib/jme-scene.jar;lib/jme-sound.jar;lib/jme-terrain.jar;lib/jmetest.jar;lib/jmetest-data.jar;lib/jme-ui.jar;lib/lib/jinput.jar;lib/lib/jogg-0.0.7.jar;lib/lib/jorbis-0.0.15.jar;lib/lib/junit-4.1.jar;lib/lib/lwjgl_fmod3.jar;lib/lib/lwjgl_util_applet.jar;lib/lib/lwjgl.jar;lib/jme-bui.jar;lib/jme-bui-src.jar; core.Game

But, the game stop his execution :(

17 juin 2007 18:49:42 start
INFO: Application started.
17 juin 2007 18:49:42 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
17 juin 2007 18:49:42 com.jme.system.PropertiesIO load
ATTENTION: Could not load properties. Creating a new one.
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at org.lwjgl.Sys$
        at Method)
        at org.lwjgl.Sys.doLoadLibrary(
        at org.lwjgl.Sys.loadLibrary(
        at org.lwjgl.Sys.<clinit>(
        at org.lwjgl.opengl.Display.<clinit>(
        at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(Unknown Source)
        at Source)
        at Source)
        at core.Game.main(
17 juin 2007 18:49:43 core.GameManager cleanup
INFO: Cleaning up resources.
17 juin 2007 18:49:43 start
INFO: Application ending.

In this log file, we can see that the lwjgl.jar is not find but the path is correct !

Any idea ?


Q. It’s broken! All I get is this error: “java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path”

A. You must point the JVM to the native library for LWJGL. On Windows this is LWJGL.dll, Linux, Mac OS X LWJGL.jnilib. There are a number of ways to “point” the JVM here. First, put the native library in a system directory, add the lib’s current directory to the PATH variable, or use the -Djava.library.path=[PATH TO LIB] JVM flag.

thank's a lot, it works !