问题
Mac OS下已经安装了Oracle的JDK 1.8版本,点击安装Eclipse-Installer报错。
您需要安装旧 Java SE 6 运行环境才能打开“Eclipse-inst”
。
解决办法
- 右键
Eclipse-Installer
显示包内容,找到Info.plist,用文本编辑器打开 - 找到如下代码
<key>Eclipse</key>
<array>
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options,
or add a VM found via $/usr/libexec/java_home -V
<string>-vm</string><string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java</string>
-->
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
</array>
将-vm一行复制出来,修改Java路径为安装的1.8的路径
保存退出,重新运行Eclipse-Installer