Mike
Mike

Reputation: 1069

Java: Getting a "Requires JDK 5.0 or later" error in Eclipse

I have just installed the JDK1.8.0 32 bit version on my computer and that all seemed to work nicely. I then followed the instructions on this stackoverflow page to add tools.jar to the Eclipse (although, to be honest, I'm not quite sure what that means?). I'm still getting the error: "Requires JDK 5.0 or later. Please download it from http://java.sun.com/j2se/1.5/".

Could someone please help me understand what the problem is? Also, please let me know if I haven't given enough information, this is my first attempt at using Eclipse and I don't know if you need any other info.

Thanks

Mike

Upvotes: 1

Views: 1033

Answers (2)

kingstante
kingstante

Reputation: 716

When you make a new project, make sure it's using the JRE you want. You may have to change it from default to "use project specific JRE", and then select the 1.8.

Upvotes: 0

The Oracle JDK installation does not install Java in the location where Eclipse by default looks for it.

I would suggest that you go to http://java.com/en/download/installed.jsp and follow instructions to get a default Java installation on your system.

Eclipse will then use that to run itself. You can then tell Eclipse about your Java 8 JDK in Preferences -> Java -> Installed JRE's and that it is to be used by default by the projects you write.

Note that there is not full support for the new Java 8 facilities in Eclipse yet. That will most likely come in Eclipse 4.4 scheduled for June (http://wiki.eclipse.org/Simultaneous_Release)

Upvotes: 2

Related Questions