0
votes

I just downloaded Eclipse, and it said "Version 1.7 or greater is required" for Java. Then I downloaded Java 1.7 and installed it and all that, and even restarted my computer. When I check my Java version in the terminal, it says Java 1.7, so why can't Eclipse recognize Java 1.7?

Thanks a lot! :)

My question isn't a duplicate of Running Eclipse on Mac - JVM Version 1.7 or greater is required because I installed the entire JDK 7 and my computer recognizes Java 1.7. Right now, I can't even open Eclipse.

EDIT: current steps I have taken:

1) finding the path (/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home) to java 1.7 with command "/usr/libexec/java_home -v 1.7"

2) pasting this path by adding the following in the eclipse.ini file,

-vm

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

Error message is still:

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

3
There isn't a lot of information to go on here. How is your build environment configured? Are you talking about the Java runtime or the jdk?SBI
You can change your version to JDK 7 explicitly in eclipse.Anil Reddy Yarragonda
I dont know how my build environment is configured... :( Sorry! Literally just downloaded Eclipse and when I click on the application it won't open because it thinks my Java version isn't correct.Shua Lam

3 Answers

0
votes

I am sure you must have done this but just in case you haven't can you make sure the environment variable's are set for Java

0
votes

Have you tried Window -> Preferences -> Java -> Installed JREs?

There you can add (Using the Standard VM option) a JDK (or JRE) by setting the path to the JDK install directory.

0
votes

right click on

project --> properties --> java compiler

and see the jdk compiler compliance level option set to 1.7 compiler, if not change it to 1.7 or higher

EDIT :-

eclipse by default will take java installation path from %JAVA_HOME% variable, firstly you check whether you have set JAVA_HOME path in your machine.

or you can manually set java path in eclipse.ini file as said in this post

How do I set the Java path in Eclipse so I can run it on an external drive?

and

How to specify jdk path in eclipse.ini on windows 8 when path contains space