As part of my Software Engineering Project (SEPR) for my course, I’m working on a game with my teammates in Java. Unfortunately, even with the latest release of OS X (10.9.2), Apple still only provide you with the JDK V1.6, which is quite old and lacks some commonly used features from 1.7 and 1.8. Although installing it isn’t exactly complicated, it’s not obvious how to link it into your system, and I couldn’t find a manual for doing this with Eclipse.
Now that I’ve found out how to do it, it makes sense to share it to potentially save you some time:
- Download the latest version (JRE 8, JDK 1.8 at the time of writing) from here.
- Install it – it should install automatically to a path similar to:
/Library/Java/JavaVirtualMachines/jdk1.8.0_<more numbers>.jdk/Contents/Home Note, the above scrolls, it ends with '/Home'
- Open Eclipse, and in the top menu go to Preferences->Java->Installed JRE’s-> and click the add button.
- Then select “Standard VM” and click next. Give it the install path from above for the “JRE Home” parameter and click Finish. Now you can select the new upgraded JRE/JDK for your projects in Eclipse.
I hope that helps.