Elliot Alderson
Elliot Alderson

Reputation: 546

Eclipse says my java is outdated, but it's not

Java.com says I have the current version

Congratulations! You have the recommended Java installed (Version 8 Update 25).

When I try to open Eclipse, it says:

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

I'm running OS X Yosemite 10.10.1 (Glorified VTech computer)

Please help me someone, I'm losing my mind completely trying just to run Eclipse. Thanks.

Upvotes: 1

Views: 1767

Answers (3)

Andry Rakotonjanabelo
Andry Rakotonjanabelo

Reputation: 11

As mentioned above, you might have 2 (or more) JDK versions on your machine. Sometimes Eclipse just defaults to one outdated version even if you have a newer one.

On Eclipse, go to Run -> Preferences -> Java -> Installed JREs, make sure you have your latest JDK/JRE path on there and change it as default JRE. If your project still refuses to run, go to Run -> Run Configurations, double click on Java Application, under JRE panel, make sure you are using the latest JRE.

I hope this helps.

Upvotes: 0

Avi Thaker
Avi Thaker

Reputation: 453

https://www.eclipse.org/forums/index.php/t/792447/

You can install an older version of java... and reference it in your project. Or like the answer above me states change your java environment to 1.7.

To do this go to Project -> Properties a new window will pop up, and click on java compiler on the left hand window, and then choose your compliance level. I hope this helps

Upvotes: 2

ali4j
ali4j

Reputation: 522

I believe that you have 2 jdk/jre installed in your machine, and JAVA_HOME environment variable has been set to the older one.

so check the value of the JAVA_HOME, and change it if it's set to the old jre.

Upvotes: 0

Related Questions