Eclipse compiler compliance level 11 not available


Home » Language IDEs » Java Development Tools (JDT) » Java Compiler Compliance Level 1.8(Can not try interfaces due to Compiler level)

Eclipse compiler compliance level 11 not available
  Java Compiler Compliance Level 1.8 [message #1273126]
Wed, 19 March 2014 14:58
Eclipse compiler compliance level 11 not available
Eclipse compiler compliance level 11 not available
 Dominik Meyer
Messages: 3
Registered: March 2014

Junior Member

Dear forum

I struggle since two hours trying to get a first Java 8 interface to run.

The Eclipse Luna IDE 4.4M6 states: Error on "default" delete this token.

I also can not set the compiler level to 1.8...

Does anybody know why I can not choose a new compiler level?

I have linked the Installed JRE 1.8 and both got JRE 1.8 and JDK 1.8 installed.

Anyone?

Thank you and best regards

Dominik

Re: Java Compiler Compliance Level 1.8 [message #1273694 is a reply to message #1273126] Thu, 20 March 2014 11:44
Eclipse compiler compliance level 11 not available
Eclipse compiler compliance level 11 not available
Eclipse compiler compliance level 11 not available
 Thomas Schindl
Messages: 6649
Registered: July 2009

Senior Member

Did you install the JDT feature patch? M6 does not by default come with
Java8 support.

Tom

On 19.03.14 08:51, Dominik Meyer wrote:
> Dear forum
>
> I struggle since two hours trying to get a first Java 8 interface to run.
>
> The Eclipse Luna IDE 4.4M6 states: Error on "default" delete this token.
>
> I also can not set the compiler level to 1.8...
>
> Does anybody know why I can not choose a new compiler level?
>
> I have linked the Installed JRE 1.8 and both got JRE 1.8 and JDK 1.8
> installed.
>
> Anyone?
>
> Thank you and best regards
>
> Dominik

Goto Forum:

Current Time: Tue Nov 29 22:41:43 GMT 2022

Powered by FUDForum. Page generated in 0.02687 seconds

Description Martin Malina 2014-04-16 07:25:23 EDT

After I installed java 8 updates [1] on top of Eclipse Kepler SR2 for Java EE Development and restarted the IDE, the JDK Compliance Level (Preferences -> Java -> Compiler) is not set correctly - meaning that the UI shows 1.8 when I open it, but effectively it is set to 1.4. At least that what a New Java Project wizard tells me:

The current workspace uses a 1.8 JRE with compiler compliance level 1.4. This is not recommended...

When I click on the link to preferences, I can see 1.8 again.
The fix here is to click Apply on the preference page. Than this warning disappears.
Also, this problem does not appear in a new workspace created with the java 8 fix already installed.

Steps to reproduce:
1. Install Java 8 updates from [1]
2. Restart IDE after installation
3. Open File -> New -> Other -> Java Project
Assert: There will be a warning about wrong compiler compliance level and a link to Preferences
4. Click on the link to Java Compiler Compliance preference page
Assert: Compliance level is set to 1.8
5. Click Apply and agree to rebuild workspace and press OK
Assert: Warning in New Java Project wizard disappeared


[1] https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler

Comment 1 Stephan Herrmann 2014-04-16 14:15:12 EDT

I don't fully understand what JRE(s) you have installed and configured in Eclipse. In particular, which JRE is the default for newly created projects? In the same vein: what exactly is the warning after your step 3?

Comment 2 Martin Malina 2014-04-16 15:09:14 EDT

Sorry, I forgot to mention that I was running Eclipse with Oracle Java 8 and this was also set as the default JRE.

The warning after step 3 is this:
The current workspace uses a 1.8 JRE with compiler compliance level 1.4. This is not recommended...

I would like to say again that when I opened the Preferences page to fix this, the compliance level was set to 1.8 - at least that's what the UI was showing. But the warning wouldn't disappear unless I hit Apply on the preference page.

Comment 3 Timo Kinnunen 2014-04-17 13:34:27 EDT

I've seen this, but I could never figure out how to reproduce it. I want to say this is caused by JDK Core not having a compliance level setting set in its preference store but JDK UI having one in its preference store, but I'm not not sure.

Comment 4 Srikanth Sankaran 2014-07-17 04:17:03 EDT

Could this be a UI issue ? Any insights are welcome, please pass back if
appropriate.

Comment 5 Noopur Gupta 2014-08-22 08:43:24 EDT

I tried on Windows 7 (bug report mentions Mac) and could not reproduce the warning with the given steps. 

I have 1.8 as the default JRE for newly created projects (checked in "Installed JREs"). After installing Java 8, restarting Eclipse and opening the "New Java Project" wizard, I just see an information message which looks fine:
"The default compiler compliance level for the current workspace is 1.7. The new project will use a project specific compiler compliance level of 1.8."

Please re-open the bug if you are still able to reproduce it.

Comment 9 Björn Michael 2016-11-15 03:00:26 EST

I can't reproduce this error either.

Workaround: temporarily activate project compiler settings with requested compliance level, build, and deactivate project compiler settings to take effect workspace compiler settings again.

But if you have to do this for 20 projects it is quite annoying.

Seen: Eclipse 4.6.1 running and used with JDK8u111.

Comment 10 Björn Michael 2017-02-11 00:40:14 EST

I haven't obtained this error for a long while. But after installing Groovy Eclipse for a new project within this workspace and some Eclipse restarts there was this error again although the relevent projects don't have groovy nature enabled. May this could be a new trace.

Comment 11 Stephan Herrmann 2017-02-11 08:50:12 EST

(In reply to Björn  Michael from comment #10)
> I haven't obtained this error for a long while. But after installing Groovy
> Eclipse for a new project within this workspace and some Eclipse restarts
> there was this error again although the relevent projects don't have groovy
> nature enabled. May this could be a new trace.

Once you installed Groovy Eclipse you no longer work with the original org.eclipse.jdt.core. Please check their site, to find out which JDT version their plugin is based on.

Which version of Eclipse is compatible with JDK 11?

Eclipse 4.23 (2022-03) It is the supported release. A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2022-03 packages based on Eclipse 4.23, with certain packages choosing to provide one by default.

How can I use Java 11 in Eclipse?

To create and run your Java 11 project using Eclipse:.
From the top bar, select Window -> Preferences -> Java -> Installed JREs, then click on Add....
Keep Standard VM selected, then click on Next >.
Browse and select your JDK installation folder by clicking on Directory , then click on Finish..
Click on Apply and Close..

What is compiler compliance level in Eclipse?

The Compiler Compliance level tells Eclipse to use appropriate settings when compiling your project to ensure you code will work on the target JVM you specify. By default, if I recall, Eclipse picks Java 5 Compliance.