NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable

Sven Svensson
I'm trying to get JOGL to work manually (without and IDE). I'm using Linux (Fedora 16, 64-bit).

I downloaded and extracted the current build (jogamp-all-platforms.7z) into /usr/local/lib

I followed this tutorial: http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing ("JOGL in Swing").

Compiling with:
javac -cp .:/usr/local/lib/jogamp-all-platforms/jar/jogl-all.jar:/usr/local/lib/jogamp-all-platforms/jar/gluegen-rt.jar  OneTriangleSwingGLCanvas.java

Compiles without errors.

Then I try to run it:
java OneTriangleSwingGLCanvas

Which produces the following stack trace:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
        at java.lang.Class.getMethod0(Class.java:2685)
        at java.lang.Class.getMethod(Class.java:1620)
        at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:492)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:484)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCapabilitiesImmutable
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 6 more

Any  ideas?
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable

Wade Walker
Administrator
Hi Sven,

You still need to have JOGL on the classpath when you run -- check out the instructions at http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Compile_and_run_your_project_from_the_command_line for examples of how to compile and run from the command line.
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable

Sven Svensson
How stupid of me! Now it works! Thank you, Wade Walker!