Login  Register

NoClassDefFoundError: javax/media/opengl/GLCapabilitiesImmutable

Posted by Sven Svensson on Nov 18, 2012; 3:49pm
URL: https://forum.jogamp.org/NoClassDefFoundError-javax-media-opengl-GLCapabilitiesImmutable-tp4027038.html

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?