我一直在尝试在Mac上安装Java3D 1.5.2(OS 10.10)。首先,我尝试使用this answer whiskeyspider中引用的安装程序。它安装了文件,但是当我尝试运行程序时出错了。所以我清除了/ Library / Java / Extensions并尝试在〜/ .local / lib中手动安装,这是我之前创建的目录,只是在我的项目的构建路径(Eclipse)中包含jar。尽管包括jar和本地库位置(对于JOGL jar),当我尝试运行程序时出现以下错误:
Exception in thread "J3D-Renderer-1" java.lang.UnsatisfiedLinkError: /Users/brianmc7/.local/lib/jogl/lib/libjogl_awt.jnilib: dlopen(/Users/brianmc7/.local/lib/jogl/lib/libjogl_awt.jnilib, 1): Library not loaded: /System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib
Referenced from: /Users/brianmc7/.local/lib/jogl/lib/libjogl_awt.jnilib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader$2.run(NativeLibLoader.java:132)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.NativeLibLoader.loadAWTImpl(NativeLibLoader.java:118)
at com.sun.opengl.impl.JAWT.getJAWT(JAWT.java:91)
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:144)
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at javax.media.j3d.JoglPipeline$QueryCanvas.doQuery(JoglPipeline.java:9049)
at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8797)
at javax.media.j3d.Renderer.doWork(Renderer.java:514)
at javax.media.j3d.J3dThread.run(J3dThread.java:275)
事实证明目录/System/Library/Frameworks/JavaVM.framework/Libraries/不存在。我该如何解决这个问题?
编辑:我可能还应该提到我正在使用JDK 1.8.0_40早期访问。
答案 0 :(得分:1)
Java3D是abandoned by Sun Microsystems / Oracle in 2008。 Java3D自2012年以来一直由JogAmp社区维护。是的,Java3D 1.6由几个预发行版组成,但它们比Java3D 1.5更好。
My own tutorial详细解释了如何安装最新版本的Java3D。