When I open a workspace in Eclipse Oxygen, the default compiler compliance level is set to 9. I change it in Preferences > Java > Compiler back to 1.8 and click Apply. It works, until I close Eclipse and reopen it and now it's back to 9. How can I make the change stick?
Note:
I know that /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance is set somewhere to 9, but I can't find out where that is.
My workspace settings were getting over-written by user-specific settings stored in ~/.eclipse/org.eclipse.oomph.setup/setups/user.setup. Specifically, that file included those leftover setup lines from a previous installation:
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform"
value="9"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance"
value="9"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source"
value="9"/>
</setupTask>
Solution:
Remove the lines above from ~/.eclipse/org.eclipse.oomph.setup/setups/user.setup.
Note: Thanks to @skomisa who helped me figure this out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With