Java3D + Jogl + XP + Eclipse = Trouble

Hi there,

I have troubles installing jogl as the rendering pipeline for a Java3D project. We are writing an ego shooter for a study project. In school we are working on macs and we have no problems after everything has been installed. The combination is Mac OS X (10.4, i believe), Java 1.5, Java3D 1.5 and the newest version of JOGL. As I said, they application runs fine and we already are capable of shooting each other ;).

Now that I wanted to try it out on my home computer where Windows XP is installed, I keep having troubles. I have Java 1.6 installed here (tried everything with 1.5, which was installed before). I installed Java3D, which runs fine. Then I tried to install jogl (I follwed a tutorial pinned in this forum) by adding the jars to the classpath and adding the folder for the .dlls to the path. But when I try to run my application, I get this Exception:

java.lang.NoClassDefFoundError: javax/media/opengl/GLException
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at javax.media.j3d.Pipeline$1.run(Pipeline.java:143)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:138)
	at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:926)
	at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:280)
	at PUniverse.PUniverse.<init>(PUniverse.java:64)
	at PUniverse.PUniverse.getPUniverse(PUniverse.java:203)
	at Client.Client.<init>(Client.java:42)
	at Client.Client.main(Client.java:93)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLException
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 11 more
Exception in thread "main" java.lang.NullPointerException
	at javax.media.j3d.Locale.<init>(Locale.java:71)
	at PUniverse.PUniverse.<init>(PUniverse.java:68)
	at PUniverse.PUniverse.getPUniverse(PUniverse.java:203)
	at Client.Client.<init>(Client.java:42)
	at Client.Client.main(Client.java:93)

NoClassDefFoundError implies that the respective .jar-File cannot be found in the classpath. To double check this I print out the actual classpath using

System.out.println(System.getProperty("java.class.path"));

. It points exactly to the jogl.jar and gluegen-rt.jar. What am I missing? I know it’s a configuration/installation issue because the application itself works definately. I do not understand why the runtime cannot find the class. The classpath definately includes those two .jars.

Any ideas are welcome! Thanks for your help.

I assume you have installed the java3d stuff to your jdk/jre ext directory. This way I think java3d is part of the bootstrap classpath and so cannot find the jogl classes, because they are part of the “normal” classpath. Try to remove the java3d stuff from the ext directory and add the jar (and natives?) in the same way as you did with jogl: adjust the classpath and path variables to point to the java3d stuff.

But I could be wrong here, since I have no experience with java3d :wink:

Try specifiying the classpath on the command line when you are executing your program.

ie. java -classpath C:\jogl\jogl.jar;c:\joglutils.jar;c:\myapp.jar MyClass