Compiling Problems

When ever I try to compile something from nehe.gamedev.net I get an error and says that it cant find the openGL api’s that he is using in the code. I cant give the exact error right now because I am not at home, but I will post it a little later. Does this mean that OpenGL is not properly installed on my machine? Im running XP pro.

You’re probably best asking this on the lwgl forum a few rows down.

Well, the tutorials at nehe.gamedev.net are gl4java, not lwjgl so this is probably the right forum.

Matt_Pociask, please post the exact error, but chances are that gl4java is not in your classpath when you compile.

Greetings,
Erik

I typed this in DOS

% java NeHe09

Heres the error:

Exception in thread “main” java.lang.NoClassDefFoundError: gl4java/awt/GLAnimCanvas
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:242)
at java.net.URLClassLoader.access$1(URLClassLoader.java:210)
at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:185)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:249)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:308)

Any ideas?

Well, I don’t know anything about gl4java, but I could imagine that gl4java has a jar file (something like gl4java.jar maybe? Should be in the gl4java docs anyway) that should be in the classpath when you run it.
The error definately points to a class of gl4java that it can’t find.

Try

java -cp the/path/to/gl4java.jar NeHe09

(of course replacing the path to the correct one), or you could dump the jar file in your /lib/ext directory.
Maybe some of the gl4java folks here can correct me if I’m wrong :).

Greetings,
Erik

Can someone tell me how to set it up? I d/l and installed the file from here:

http://www.jausoft.com/products/gl4java/gl4java_install.html

but it still doesn’t work.