java.lang.NoClassDefFoundError: Work/3D

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

java.lang.NoClassDefFoundError: Work/3D

sub_o
Hi everyone,

I was trying to have my eclipse on Mac OS 10.6.7 running JOGL, but alas, after setting the build path to point to the jar files and the native libraries pointing to all the jnilib, I'm still unable to run any program. It just gives me this exception:

Exception in thread "main" java.lang.NoClassDefFoundError: Work/3D
Caused by: java.lang.ClassNotFoundException: Work.3D
        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:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

I got my JOGL from http://jogamp.org/deployment/webstart/archive/jogl-2.0-b23-20110303-macosx-universal.7z

unpacked it into my projects folder with gluegen-rt.jar, jogl.all.jar, nativewindow.all.jar, newt.all.jar set onto my build path, and the native library locations pointing to the /lib folder.

Is there anything else that I need to set (e.g. CLASSPATH, etc ?) ? Since this is obviously because it can't load the Java class from the library itself.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Work/3D

Wade Walker
Administrator
Is the string "Work/3D" in any of your directory names, by any chance?  I've seen this problem before -- when you have a directory name with spaces in it, you sometimes have to quote it inside Eclipse or IntelliJ when setting a native library path or other command line options intended for your program. Otherwise the IDE breaks the directory name up at the spaces, and uses parts of it as class names to feed to Java on the command line, which is why you get the NoClassDefFoundError.