Closed laeubi closed 2 years ago
You have JRE, not JDK installed?
JDT claims that it is a JDK and the path name also indicate its a JDK, but the preferences always name them as JREs (should it matter anyways?) Window> Preferences > Java > Installed JREs
Aua. You seem to configured project with --release 17
on Java 17?
I don't do not configure anything specific here... might be automatically derived from maven settings or something... so whats wrong with --release 17 on Java 17
, I think the tool generating this can't know if Java 17, 18, 19... is my default JVM, so maybe JDT can ignore this if it is useless?
so whats wrong with
--release 17 on Java 17
JDT decides to look for Java 17 "compatibility layer API's" in lib/ct.sym
file, but there is no such in 17 file.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562764 and proposed patch https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/161966.
I've tried to run into your error, but I'm unable to construct such case. Now, that this is a user visible error, the patch makes more sense.
Please provide exact steps to reproduce (and platform/JDK used), ideally also concrete project settings used.
According to the error log for example this project is affected:
https://github.com/eclipse-m2e/m2e-core/tree/master/org.eclipse.m2e.pde.connector
The project preferences are like this:
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
I suspect org.eclipse.jdt.core.compiler.release=enabled
is the crucial part and I'm using a jdk-17.0.2
as default vm and another jdk-11.0.8
, no other JDKs configured.
@laeubi : would be interesting if you could grab tomorrow' build and try again. If that should again report some error, please reopen this issue.
I see this in the error log:
A java 17 JDK is available and selected as the default JRE in my settings.