天天看點

java3d Intellij suddenly throwing ClassNotFoundException

出現這個問題的原因和解決辦法連接配接

Nov ,  :: PM org.jdesktop.application.Task failed
SEVERE: My.Application$9@7c4f8358 failed: java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
at jpl.mipl.jade.jadis.agile2d.swing.JOGLPluggableRenderer.notifyBeforeSetRootPane(JOGLPluggableRenderer.java:)
at jpl.mipl.jade.jadis.StereoJFrame.setRootPane(StereoJFrame.java:)
at javax.swing.JFrame.frameInit(JFrame.java:)
at javax.swing.JFrame.<init>(JFrame.java:)
at jpl.mipl.jade.jadis.StereoJFrame.<init>(StereoJFrame.java:)
at StereoWS.DSStereoFrame.<init>(DSStereoFrame.java:)
at StereoWS.StereoWSView$9.doInBackground(StereoWSView.java:)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:)
at java.util.concurrent.FutureTask.run(FutureTask.java:)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCapabilitiesChooser
at java.net.URLClassLoader$1.run(URLClassLoader.java:)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
...  more
           

解決辦法:

down vote
accepted
I believe you are using Java3D jars from the old Oracle site in combination with the latest JogAmp JOGLv2, this will not work of two reasons A) the jogl.jar is now renamed jogl-all.jar B) internal namespace changes, all com.sun.* classes is now found under com.jogamp.* and this will confuse the old Java3D code that expects the com.sun.* namespace.

Both JOGL and Java3D is now maintained by members of the JogAmp community: Background of the move: http://labb.zafena.se/?p= The only supported way to use Java3D today is by using the community maintained Java3D in combination with the latest JogAmp JOGL v2.

Tutorial on how to setup the latest community maintained Java3D in combination with JOGLv2. Julien Gouesse: Java 3D est de retour [Java 3D is back] http://gouessej.wordpress.com/2012/08/01/java-3d-est-de-retour-java-3d-is-back/
           

大緻原因是因為使用老版本oracle java3d jar與最新jogAmp,解決辦法是更新java3d jar檔案

需要的java3d jar 檔案和 jogAmp jar檔案

原文出處:http://stackoverflow.com/questions/13365593/java3d-classes-not-found

繼續閱讀