在我的 Mac 上,我在本地删除了 java,只是删除了带有 java (/System/Library/Frameworks/JavaVM.framework/Versions/) 的文件夹。
当我再次安装 java 6 时,我被安装到:/Library/Java/JavaVirtualMachines/
然后在安装新的之后,尝试从控制台调用“./java”时出现此错误:
在这里,我将 java 放入我的主目录。但是,即使使用标准的我也有同样的例外:
dyld: Library not loaded: /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
Referenced from: /Users/myuser/java/1.6.0.jdk/Contents/Home/bin/./java
Reason: image not found
Trace/BPT trap: 5
有什么办法可以解决吗?
---2---
在这里,我只是从不同的机器上复制工作 Java 6 并放到正确/默认位置,然后转到 .../bin 并输入 ./java:
$ pwd
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
$ ./java -version
dyld: Library not loaded: @rpath/libjli.jnilib
Referenced from: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/./java
Reason: image not found
Trace/BPT trap: 5
但是如果安装 Java 7,它就可以完美运行。
--3--
如果在其中安装带有 jdk6 的 JavaDeveloper.pkg 包 (javadeveloper_for_os_x_2012006__11m3909.dmg) - 来自 Apple 网站
dyld:库未加载:/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 引用自:/Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/bin/./ java 原因:找不到图像 Trace/BPT 陷阱:5
--4--
如果尝试从mac 端口安装 java 6 (open jdk)
$ sudo 端口安装 openjdk6
info:build Exiting because of the above error(s). \n
:info:build make: *** [post-sanity] Error 1
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_openjdk6/openjdk6/work/." && /usr/bin/make ARCH_DATA_MODEL="64" ALT_BOOTDIR="/opt/local/share/java/openjdk6_bootstrap" ALT_JDK_IMPORT_PATH="/opt/local/share/java/openjdk6_bootstrap" ALT_BINARY_PLUGS_PATH="/opt/local/share/java/icedtea6-plugs/jre/lib/rt-closed.jar" ALT_DROPS_DIR="/opt/local/var/macports/distfiles/openjdk6" ANT_HOME="/opt/local/share/java/apache-ant" ALT_FREETYPE_HEADERS_PATH="/opt/local/include" ALT_FREETYPE_LIB_PATH="/opt/local/lib" ALT_CUPS_HEADERS_PATH="/usr/include" ALT_MOTIF_DIR="/opt/local" ALT_X11_PATH="/opt/local" ALT_DEVTOOLS_PATH=/usr ALT_CACERTS_FILE=/System/Library/Frameworks/JavaVM.framework/Home/lib/security/cacerts NO_DOCS=true LANG="C" BUILD_NUMBER="b20" MILESTONE=fcs HOTSPOT_BUILD_JOBS="2"
**:info:build Exit code: 2
:error:build org.macports.build for port openjdk6 returned: command execution failed
:debug:build Error code: CHILDSTATUS 7773 2
:debug:build Backtrace: command execution failed**