LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: slenkar on December 14, 2009, 17:51:58

Title: cant run game outside of eclipse
Post by: slenkar on December 14, 2009, 17:51:58
im trying to run the JAR file that I exported from eclipse with this command line on windows:

java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; -Djava.library.path=windows -jar learn.jar

and several other methods but it always says

cant initialize class org.lwjgl.opengl.display


Title: Re: cant run game outside of eclipse
Post by: Wolftein on December 14, 2009, 20:30:00
Quote from: slenkar on December 14, 2009, 17:51:58
im trying to run the JAR file that I exported from eclipse with this command line on windows:

java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; -Djava.library.path=windows -jar learn.jar

and several other methods but it always says

cant initialize class org.lwjgl.opengl.display

Copy all the content of lwjgl.jar, lwjgl_text.jar, etc into your learn.jar. so you don't need to pass .jar library locations or check inside the "learn.jar - Manifest.MF" This line
"Class-Path: (PATH)/(LIBRARYNAME).jar"
Title: Re: cant run game outside of eclipse
Post by: slenkar on December 14, 2009, 20:43:23
it couldnt see the DLL files, I had to use netbeans and put the DLL's next to the JAR
Title: Re: cant run game outside of eclipse
Post by: Wolftein on December 14, 2009, 21:49:58
Quote from: slenkar on December 14, 2009, 20:43:23
it couldnt see the DLL files, I had to use netbeans and put the DLL's next to the JAR

Then this line is bad.  "-Djava.library.path=windows"

your directory must be this.

Directory/
---- Tester.jar
---- windows/
--------- lwjgl.dll
--------- etc

and the correct is "-Djava.library.path=windows/"