Problems installing and using JOGL

I’m having problems getting jogl to work.
I’ve followed all the instructions but just can’t get it to work.
I’m using windows xp home and downloaded jogl-1.1.1-windows-i586 which I placed in My Documents\java\jogl.
I set the classpath and path environment variables to point to the jogl directory.

So first I import everything with:

import javax.media.opengl.*;

then I have something like this:

public static void main(String[] args){
GLCanvas canvas = new GLCanvas();
}

It compiles without any problems but when I run it I get this error:

Exception in thread “main” java.lang.NoClassDefFoundError: javax/media/opengl/GLCanvas
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCanvas

Does anyone know what I am doing wrong?

As far as I know, you should set the classpath so that it points on the directory lib/ that contains the DLLs and the JARs.

The CLASSPATH has to contain the path to the jogl.jar and the gluegen-rt.jar. The PATH variable has to point to the directory, which contain the dlls.

How do you compile? Are you using an IDE? If it compiles in the same environment as you run it, you should not get this error. Maybe it’s some problem with the spaces in the paths!?