hi! i'm trying to run the Lesson06 from nehe.gamedev.org but it won't work!! i downloaded devil from the 0.94 version of lwjgl. it compiles fine (i use jCreator coz i don't know how to compile from the command line)
i used this command: java -cp .;res;jar\lwjgl.jar;jar\lwjgl_devil.jar; -Djava.library.path=native\win32 Lesson06
a window shows up for like a second and then disappears.
i don't know what to do anymore >_< what did i do wrong??
if there is no output, then it's probably exiting without actually telling what the error is. You should check the exceptions that are thrown.
try run the command in a batch file (make sure u use java not javaw)
place pause after it, so u can read if there is any error comn throught the vm, ummmm.... u edit it urself or is it the original code, if its original, im blank
so i threw exceptions and now a window showed for a second and then i got a
java.lang.NoClassDefFoundError: org/lwjgl/devil/IL ...
is it the installation?
you need to download the optional package which includes devil and add that to the classpath
i did.. i downloaded lwjgl-1.0 and then i downloaded the optional package and put the files in the jar folder where the rest are and then i used this command :
java -cp jar\lwjgl.jar;jar\lwjgl-devil.jar; -Djava.library.path=native\win32 Lesson06
since you're getting a NoClassDefFoundError: org/lwjgl/devil/IL - I'm pretty sure its becase the VM feels that a No Class Definition Found Error was a valid thing to throw ;)
so, the devil classes aren't on your classpath, despite what you have typed on the command line.
hahah okay i got my stupid mistake.. it was lwjgl_devil not lwjgl-devil...
however now i'm back to where i was before... it showed a window with a black background for a second and then it disappears....
I just downloaded it, and fixed a simple error in it:
change:
IL.ilGenImages(1, image);
to
IL.ilGenImages(image);
execute with:
java -classpath .;jar\lwjgl.jar;jar\lwjgl_devil.jar -Djava.library.path=native\win32 Lesson06
works as expected
make sure that jars and natives are where expected.
(the bat file uses javaw, which will not show you any errors. Use java - not javaw instead)
HALLELUJAH IT WORKS!!
i reinstalled everything lol.
thanks for your help, greatly appreciate it :)