-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for Java 21 #3314
Conversation
This might be a stupid comment, but please add support for this soon! I really need it for work and it blocks me otherwise. I already tried using the test extension linked in this PR, but sadly I am getting TONS of "Unbound classpath container" errors. |
@blaumeise20 You can try VS Code Java 1.24.6 |
I did actually try your extension but it for some reason didn't work. I even deleted the entire old extension manually in the .vscode folder and installed the one you linked, but without success. It stays at JavaSE-17 for me, even though I explicitly set the default to JavaSE-21 in the settings. |
@blaumeise20 Could you try VS Code 1.24.7? |
@snjeza "version": "1.24.7",
---
"properties": {
"name": {
"type": "string",
"enum": [
"J2SE-1.5",
"JavaSE-1.6",
"JavaSE-1.7",
"JavaSE-1.8",
"JavaSE-9",
"JavaSE-10",
"JavaSE-11",
"JavaSE-12",
"JavaSE-13",
"JavaSE-14",
"JavaSE-15",
"JavaSE-16",
"JavaSE-17",
"JavaSE-18",
"JavaSE-19",
"JavaSE-20"
], |
I just figured out the same, yeah. |
@blaumeise20 @cypher256 Could you please try VS Code 1.25.1 ? |
Hello. This worked for me (on Code Server). Many thanks. However, the |
@aghasemi You may want to take a look at eclipse-jdtls/eclipse.jdt.ls#2863 (comment) |
Java 21 worked correctly on 1.25.1. Excellent! |
I tried it with the version you provided and it still doesn't work correctly. I can't provide an example because it is a 15-year-old company project with thousands of files, but I can show you a part of the .classpath file: <?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src_gen"/>
...
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-21">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
...
</classpath> |
It turned out I just had to change |
Getting errors with 1.25.1 on tons of imports as well as on certain interface implementations (The type xyz must implement the inherited abstract method blah). Standard (but very large) gradle project that works on Java 17. LSP log has errors that look like
|
@slymon99 Could you try to update to the 8.4 version of gradle? See https://docs.gradle.org/current/userguide/compatibility.html |
I am on gradle 8.4 already
|
Could you attach a project example? |
Note: vscode-gradle feat(jdk): Support JDK21 |
This is an upstream buildship issue. buildship doesn't support JDK 21/gradle 8.4 |
Created an issue upstream eclipse/buildship#1271. Not sure if this blocks this release, is gradle support implicitly part of the LSP? |
No, it doesn't block this PR. Only Gradle projects that use JDK 21/Gradle 8.4 will not work. |
Signed-off-by: Snjezana Peco <[email protected]>
Fixes #3292
Requires eclipse-jdtls/eclipse.jdt.ls#2863
Test vsix - VS Code 1.24.5