ClassNotFoundException.

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

ClassNotFoundException.

Billy
I had a working Java3d project.  Recently I came across the internet article that said that Java3d 1.6.0 was not available.  I downloaded that, removed the existing CLASSPATH, created new CLASSPATH with the new jar files, and also removed the path to the native libraries (the ones that came with 1.5.2).  However, when I run the application, I get this ClassNotFoundException.  As below.

run:
3D [dev] 1.6.0-pre1-daily-experimental daily

Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GLException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:76)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:64)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:93)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:929)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:294)
        at javax.media.j3d.Canvas3D.<clinit>(Canvas3D.java:3868)
        at j3dapp.J3DApp.<init>(J3DApp.java:41)
        at j3dapp.J3DApp.main(J3DApp.java:35)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLException
        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)
        ... 11 more
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

I don't know what I am doing wrong.  Please could someone help.  Thanks a lot in advance.
Reply | Threaded
Open this post in threaded view
|

Re: ClassNotFoundException.

hharrison
Please be specific, which version of Java3d and jogl are you using, including where you downloaded them
from.

The above looks like you have either jogl1 and a Java3d that wants jogl2, or jogl2 and a Java3d that wants jogl1.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: ClassNotFoundException.

Billy
Hi,

Thanks for your reply.

I downloaded java3d-core, java3d-utils and vecmath (all jar files) from

https://github.com/hharrison/java3d-core
https://github.com/hharrison/java3d-utils
https://github.com/hharrison/vecmath

As per the output I pasted, it looks like it is version 1.6.0.  I don't think I am using jogl at all.  In my project, I use java 3d to show a civil structure in 3d view.  

Earlier I was using java 3d version 1.5.2.  I use NetBeans.  So I had put in the .dll files into System32 folder (in Win 7) (and also .so files into /lib folder in Ubuntu 11.10 and now in 12.04).  I was able to work with that (of course after attaching the jar files to the project libraries).  After I downloaded java 3d version 1.6.0, I removed the .dll and .so files from their respective libraries.  When I run the project I get that ClassNotFoundException.  

I hope I have been clear with my explanation.  

Thank you,
Billy.
Reply | Threaded
Open this post in threaded view
|

Re: ClassNotFoundException.

gouessej
Administrator
Hi

JOGL 2.0 is necessary to run Java3D. You need jogl.all.jar, gluegen-rt.jar and all JARs containing the native libraries for the platform(s) you wish to support. Just download them here this time:
http://jogamp.org/deployment/archive/master/gluegen_559-joal_333-jogl_754-jocl_619/archive/jogamp-all-platforms.7z

The JARs containing the native libraries don't have to be in the classpath but they have to be in the same directory that jogl.all.jar and gluegen-rt.jar. Put jogl.all.jar and gluegen-rt.jar into your classpath too. Maybe look at this for Netbeans IDE:
https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: ClassNotFoundException.

hharrison
In reply to this post by Billy
Yeah, I built those jars, they only support jogl2, so you will need that as well....let me know how it goes.