Running Eclipse on Mac - JVM Version 1.7 or greater is required

匆匆过客 提交于 2019-12-05 01:44:14

Simply Install the JDK 7 or JDK 8, and not just the latest JRE.

Run whereis java in a Terminal. It will normally display something like /usr/bin/java.

Now run java -version. It shows you 'java version 1.6.0_65' or something approaching. This is because Java 7 does not replace Java 6. Java 7 is installed as an Internet Plug-in and can be found in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.

What you need to do is to symlink /usr/bin/java to /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.

Restart Eclipse, or reboot your computer (I don't know how Eclipse manages this), and it should do the trick. :)

user3552900

I went to oracle downloads and the scrolled one of the several Mac osX links and downloaded jdk-8u73-nb-8_1-macosx-x64.dmg from oracle and that fixed the problem. I don't know why updating java doesn't do the trick.

add this script into 'eclipse.ini' at the top '/Library/java/JavaVirtualMachines/jdk1.8.0_77.jdk/contents/Home/bin'

CGnewbie

Trying to install eclipse, I installed java version 1.6.0_65 as it requested yet still was blocked from finishing the Eclipse install with the error that I needed 1.7 JVM or higher - not true, installing higher didn't work either. I tried installing jdk-8u101-macosx-x64.dmg and that didn't work. So, I tried JDK 7 as advised, sorry no good.

So, to get the Eclipse installer to run with out that java error I had to edit the Info.plist inside the Eclipse Installer. Right click the Eclipse installer and show package contents, then open info.plist in textEdit.app

(Note: So after several tries editing this plist and following methods mentioned elsewhere nothing worked, I found that you have to use the symlink or java alias because java is installed differently now a days as an internet plugin.)

Where you want to make an edit (You should probably Backup the original or you can download it again), under <key>Eclipse</key>, then <array>, delete out what's there and add <string>-vm</string> and this string underneath; <string>/usr/bin/java</string>

Here is what mine looks like.

<key>Eclipse</key>
<array>
<string>-vm</string>
<string>/usr/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>

Then save and try running your eclipse installer; this worked for me.

Just running the below command from there terminal worked for me.

brew cask install java

It updated my idk with 1.8, and after that eclipse opens successfully.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!