0

OS X Mavericks. I installed the 64-bit latest eclipse few weeks ago. It ran just fine. A few weeks later, I installed jenv and, I believe, since then eclipse isn't working fine. To be sure, both eclipse and JDK 8 are 64-bit. Why do I get the error dialog "Incompatible JVM" with message as "Version 1.6.x of the JVM is not suitable for this product. Version 1.7.0 or greater is required".

After locating the eclipse.ini, I find this in the eclipse.ini file.

-vmargs
-Dosgi.requiredJavaVersion=1.7

Why did eclipse work earlier and why isn't it working fine now ?

anjanMac:eclipse anjanb$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
anjanMac:eclipse anjanb$

I can compile and run java(using jdk 8) just fine on the command line.

So, what's wrong and how do I fix it ?

anjanb
  • 12,999
  • 18
  • 77
  • 106

2 Answers2

1

Eclipse looks for a JRE to use in various places if not specified in eclipse.ini. Try specifying the 1.8 JDK/JRE in eclipse.ini, something like this in your case: (note the separate lines)

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java

More info on the detailed setup here: http://wiki.eclipse.org/Eclipse.ini ("-vm value: Mac OS X Example")

  • I tried this however I still get the same error message. – anjanb Oct 03 '14 at 08:32
  • A similar problem still exists for Eclipse Photon and High Sierra in 2018. You need to download JAVA SDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and edit eclipse.ini as described. – Armut Jul 06 '18 at 17:19
-1

Eclipse doesn't recognize that java is updated with the standard java updater. What worked for me was installing the Java SE Development kit 8.

Download from here. Try to open the installer again after installing the SE.

ZF007
  • 3,708
  • 8
  • 29
  • 48