我正在尝试开发一个 java3d 应用程序,我尝试了一切,我只是下载了 jogamp 平台,因为我可以在许多网站上阅读 java3d 已过时,而对于 mac os x 你需要这个,我把它们都放在 /System/ Frameworks/Java/Extensions 我的 .jar 文件在哪里,以便不添加到 Eclipse 中的类路径,但仍然出现相同的错误:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/AbstractGraphicsDevice
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at javax.media.j3d.Pipeline$1.run(Pipeline.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:138)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:926)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:280)
at javax.media.j3d.Canvas3D.<clinit>(Canvas3D.java:3862)
at Apartado_a.<init>(Apartado_a.java:17)
at Apartado_a.main(Apartado_a.java:67)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.AbstractGraphicsDevice
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 sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 10 more
这些是扩展文件夹中的文件:
j3daudio.jar
j3dcore.jar
j3dutils.jar
joal-natives-macosx-universal.jar
jogl-all.jar
gluegen-rt.jar
gluegen-rt-natives-macosx-universal.jar
问候!