Reputation: 945
I'm using Eclipse Mars and I can't see 1.8 in the compiler compliance level menu.
Prehaps, it is because I used this option to import all my plugins from my Eclipse Kepler installation. Maybe it also import preferences that causes this problem.
I added the jdk 1.8 in the Installed JREs. I tried to delete the .preferences folder and restart my eclipse but I still have the problem.
Any ideas?
EDIT : I tried to check for updates but no updates were found
Upvotes: 3
Views: 12484
Reputation: 3825
I had the same problem. Probably it was because I originally installed Eclipse Kepler (which doesn't support java 1.8. compiler) and then updated it to Luna first and then to Mars. I had to completely uninstall Eclipse and reinstall newest version.
Upvotes: 1
Reputation:
If you have a shortcut to start eclipse, edit it and add -vm [path-to-jdk-1.8]/jre/Javaw.exe
after the path to eclipse.exe .
You can also add the code to your eclipse.ini but make sure it is the very first line. Afterwards you might be able to chose 1.8 in the global compliance level
Upvotes: 0
Reputation: 43052
You need to select the appropriate java version in the project's/ build path first
If you want to apply it globally you not only have to add a 1.8 JRE but also select it as default.
Upvotes: 2