LWJGL Forum

Archive => DevIL => Topic started by: ararie on March 02, 2007, 03:38:52

Title: Lesson06 noob problem
Post by: ararie on March 02, 2007, 03:38:52
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??
Title: Re: Lesson06 noob problem
Post by: Matzon on March 02, 2007, 05:51:21
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.
Title: Re: Lesson06 noob problem
Post by: bobjob on March 04, 2007, 18:24:56
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
Title: Re: Lesson06 noob problem
Post by: ararie on March 08, 2007, 07:44:55
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?
Title: Re: Lesson06 noob problem
Post by: Matzon on March 08, 2007, 08:51:37
you need to download the optional package which includes devil and add that to the classpath
Title: Re: Lesson06 noob problem
Post by: ararie on March 08, 2007, 17:05:26
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
Title: Re: Lesson06 noob problem
Post by: Matzon on March 08, 2007, 17:18:25
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.
Title: Re: Lesson06 noob problem
Post by: ararie on March 08, 2007, 19:05:45
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....
Title: Re: Lesson06 noob problem
Post by: Matzon on March 08, 2007, 21:40:29
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)
Title: Re: Lesson06 noob problem
Post by: ararie on March 09, 2007, 00:18:14
HALLELUJAH IT WORKS!!

i reinstalled everything lol.
thanks for your help, greatly appreciate it :)