3

I'm using Eclipse Mars and I can't see 1.8 in the compiler compliance level menu.

enter image description here

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. enter image description here

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

Clemzd
  • 895
  • 2
  • 15
  • 35

3 Answers3

2

You need to select the appropriate java version in the project's/ build path first

jdk selection

If you want to apply it globally you not only have to add a 1.8 JRE but also select it as default.

the8472
  • 40,999
  • 5
  • 70
  • 122
  • 1
    I tried this but I don't have [this option in the execution environment](http://i.imgur.com/Ufgwogy.png). Despite I have the 1.8 jdk in the [installed JREs](http://i.imgur.com/u0EPRtT.png).. – Clemzd Jul 01 '15 at 07:41
  • You could just try using `alternate JRE` instead of the execution environment. although the environment definitely should be there in mars. – the8472 Jul 01 '15 at 08:28
1

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.

Iwo Kucharski
  • 3,735
  • 3
  • 50
  • 66
0

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