我一直在尝试在Mac(OS 10.10)上安装Java3D 1.5.2。首先,我尝试使用this answerwhiskeyspider中引用的安装程序。它安装了文件,但是在尝试运行程序时出现错误。因此,我清除了/ Library / Java / Extensions并尝试将其手动安装到我之前创建的目录〜/ .local / lib中,并将jars包含在项目的构建路径(Eclipse)中。尽管包括了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早期访问。

最佳答案

Java3D是abandoned by Sun Microsystems / Oracle in 2008。自2012年以来,JogAmp社区一直在维护Java3D。是的,Java3D 1.6由多个预发行版本组成,但它们的性能比Java3D 1.5好得多。

My own tutorial详细说明了如何安装最新版本的Java3D。

10-08 00:06