0

I get the following error when I open Eclipse:

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

My eclipse.ini file has -vm /System/Library/Java/JavaVirtualMachines/1.6.0.jdk (of course before -vmargs)

I have been trying to update to Java8 so I can get 1.8.0.jdk but it is not appearing at the above location, nor can I find it elsewhere.

When I run java --version, I get the follow output:

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)

user2981968
  • 51
  • 1
  • 2
  • 3

3 Answers3

2

As explained by @Anthony Accioly check for correct version of JDK like :-

If /usr/libexec/java_home -v 1.8.0_05 --exec javac -version returns the correct version, then your problem is with:

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK

With a privileged user execute:

cd /System/Library/Frameworks/JavaVM.framework/Versions/
rm CurrentJDK
ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/ CurrentJDK

For more detail on this click here After upgrading to Java8, javac still shows 1.7

Also check Error launching Eclipse 4.4 “Version 1.6.0_65 of the JVM is not suitable for this product. - stackoverflow

Community
  • 1
  • 1
OO7
  • 2,785
  • 1
  • 21
  • 33
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Khantahr Aug 14 '14 at 20:09
  • Ok. I'll update my answer. – OO7 Aug 14 '14 at 20:12
  • @ Brent Worden I didn't get *To critique or request clarification from an author* means. What u r saying to me ? – OO7 Aug 14 '14 at 20:45
  • Note that this effectively coerces the Apple Java selection mechanism to use the Oracle JVM instead. Mixing the two may turn out later to be a bad idea - Apple has been known to remove Java versions silently like when they upgraded Java 5 to Java 6 causing Eclipse projects to break like in http://stackoverflow.com/q/4340576/53897. – Thorbjørn Ravn Andersen Aug 14 '14 at 22:42
1

From the command line (Applications -> Utilities -> Terminal), run the command

/usr/libexec/java_home

This will return the location of the 1.8 JDK. Incidentally, this should match

echo $JAVA_HOME

if that variable is set.

0

You must use a 64-bit version of Eclipse 4.4 with OS X.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
  • More explanation on this answer by @ Thorbjørn Ravn Andersen is found at https://stackoverflow.com/questions/24598465/eclipse-in-os-x-uses-different-version-of-java-than-cli/ – OO7 Aug 14 '14 at 21:08