38

I have a problem launching Eclipse 4.4 on my Mac. I'm getting the following error: "Version 1.6.0_65 of the JVM is not suitable for this product." I have the latest version installed. When I'm running java -version I'm getting:

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

Here is my eclipse.ini file where I already tried to explicit set the -vm parameter to my jdk1.8:

-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-vm 
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
andreaspfr
  • 2,298
  • 5
  • 42
  • 51

3 Answers3

74

Here's how to fix this error when launching Eclipse:

Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.7 or greater is required.

  1. Go and install latest JDK

  2. Make sure you have installed 64 bit Eclipse

John R Perry
  • 3,916
  • 2
  • 38
  • 62
user3830506
  • 749
  • 4
  • 2
  • I already had the x64 edition of eclipse. This solved the issue for me. – Marty Sep 26 '14 at 16:15
  • 1
    This was the key bit for me: "Install appropriate Java SE Development Kit". (This is also known as the JDK, and is not to be confused with the smaller-sized Java Runtime Environment, or JRE). Thank you! – Ben Johnson May 07 '16 at 19:46
  • 1
    This has solved the problem! – itzo Apr 17 '18 at 16:45
10

Your -vm argument seems ok BUT it's position is wrong. According to this Eclipse Wiki entry :

The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.

So your -vm argument is not taken into account and it fails over to your default java installation, which is probably 1.6.0_65.

Mathieu Fortin
  • 1,048
  • 7
  • 17
  • 3
    That solved the problem for me - I added `-vm` option with path to java to `eclipse.ini` before --`launcher.appendVmargs` and it worked like a charm. My problem was the same and I had 64bit Eclipse, but it's fixed now :) – Yuriy Nakonechnyy Feb 24 '16 at 16:13
  • This should be the right answer – Ordiel Aug 10 '17 at 19:53
2

Please check if you got the x64 edition of eclipse. Someone answered this just a few hours ago.

atamanroman
  • 11,607
  • 7
  • 57
  • 81
  • 2
    If this doesn't work (it didn't for me) installing the Java Development Kit (NB Not the JRE) from Oracle as suggested by the other answer is recommended. – thclark Oct 06 '16 at 16:51