JOGL: cannot run java on compiled class file

Posted by John Goche on Stack Overflow See other posts from Stack Overflow or by John Goche
Published on 2011-11-17T01:47:33Z Indexed on 2011/11/17 1:50 UTC
Read the original article Hit count: 307

Filed under:
|
|

I am running ubuntu Linux 11.10. I have followed the instructions on the site

http://jogamp.org/jogl/www/ and downloaded everything with git to $HOME/jogamp

and built everything with ant (although I would have prefered the files installed

somewhere under /usr/local).

I am trying to run a simple application with JOGL found on the Wikipedia site:

http://en.wikipedia.org/wiki/Java_OpenGL

In order to compile the file I had to add:

export CLASSPATH.:$HOME/jogamp/jogl/build/jogl/classes

in order to compile the code.

When I run java I get the following:

$ java JOGLQuad
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/nativewindow       
/WindowClosingProtocol
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: javax.media.nativewindow.WindowClosingProtocol
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
Could not find the main class: JOGLQuad.  Program will exit.

How do I fix this and where can I find more JOGL code samples

that I can compile and run?

Thanks,

John Goche

© Stack Overflow or respective owner

Related posts about opengl

Related posts about setup