Eclipse – How to Get It to Detect Java on macOS Yosemite

eclipsejavamacososx-yosemite

I have always been able to use Eclipse without a problem. I had it installed on my Mac but when I switched to Yosemite I removed it. Now I have installed it again, but when I try to compile my Java code I get errors saying I need the JRE.

What I did already:

  1. I used this version of Android + Eclipse for Mac.
  2. I installed the JDK 8 from Oracle and JRE.
  3. Made my project try to compile on 1.7 and 1.6 Java.

Any ideas how I can fix this?

Error message:

enter image description here

enter image description here

Best Answer

See Need to change Eclipse JRE for OS X 10.10 Yosemite or Java JRE Installation location Mac OS X 10.10 Yosemite or Need to change Eclipse JRE for OS X 10.10 Yosemite for procedures to get your JRE seen by Eclipse.

From what I understand you should be using this Java: Java for OS X 2014-001. An older Apple JRE 1.6 for Lion/Mavericks purportedly won't work on Yosemite, but without trying that could be hearsay.

Related Question