10

I downloaded Eclipse (specifically that for C/C++ Programming) for Mac, running OSX Mavericks. When I try to start Eclipse, it gives me this message: "Version 1.6.0_65 of the JVM is not suitable for this product. Version 1.7 or greater is required", and it doesn't open. I installed Java version 7, but nothing changed. I don't know how else to update the JVM (I don't know much about Java in general).

I downloaded the 64-bit version for my MacBook Air, if that matters.

Tchaikovsky
  • 333
  • 2
  • 4
  • 11
  • 1
    possible duplicate of [How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?](http://stackoverflow.com/questions/10352715/how-do-i-run-eclipse-using-oracles-new-1-7-jdk-for-the-mac) – Iłya Bursov Aug 19 '14 at 15:26

6 Answers6

19

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

Nadeem
  • 556
  • 1
  • 4
  • 13
  • Here's the download page for v8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html – wloescher Jul 01 '15 at 16:55
  • I had this problem on my MacOS 10.13.2 High Sierra desktop. I followed wloescher's link above to install the JDK, then re-ran the Eclispe installer. The installer worked for me, simply, with no issues. – Matt Dec 27 '17 at 16:07
1

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. :)

Richard-Degenne
  • 2,892
  • 2
  • 26
  • 43
0

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.

Erick G. Hagstrom
  • 4,873
  • 1
  • 24
  • 38
0

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

LKM
  • 2,410
  • 9
  • 28
  • 53
0

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.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
CGnewbie
  • 9
  • 1
0

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.