I upgraded to the latest Eclipse Mars.2 Release (4.5.2) and there is one issue that is driving me crazy.
Every time I refresh a project JDK version 8 is added here:
.classpath
, this line changes:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_72"/>
.settings/org.eclipse.jdt.core.prefs
, this line changes:
org.eclipse.jdt.core.compiler.compliance=1.8
My project has been using JDK 6 for years. I have installed JDK 6 and 8 for testing purposes.
No matter if I change the project settings manually, every time I refresh the project Eclipse automatically sets version 8.
Even if I disable Enable project specific settings
, when I refresh the project, that option is re enabled and the file .settings/org.eclipse.jdt.core.prefs
is created with this content:
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.compliance=1.8
Also, in Global Preferences > Java > Compiler I set 1.6 and in Installed JREs jdk1.6.0_43
is set as default.
This started happening after I upgrade Eclipse, so it is surely a bug. However, I would like to know if there is any workaround.
Other things I tried and did not work:
- Cleaning the project
- Starting Eclipse with
eclipse -clean