-
Notifications
You must be signed in to change notification settings - Fork 377
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
Support for JDK 20, 21? #2898
Comments
@oscarvarto VS Code/Java LS supports JDK 20. See https://github.com/redhat-developer/vscode-java - |
Closing as this will be fixed in the next release with #2863 . There may be some preview features not completely implemented but those should make it in eventually. |
I've updated the wiki. Java 21 support has been present since https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/CHANGELOG.md#1300-november-30th-2023 although some of the preview features were lacking. With Java 22 out, one needs to use that in order to use those. Do you have a JDK 21 on your system ? Is the projec you're using a Maven, Gradle or just some folder with Java source files ? Are you setting |
@rgrunber Thanks for updating the Wiki! Yes, I have Temurin 21 JDK installed. My project uses Maven 3.9.6. My pom.xml contains settings = {
java = {
eclipse = {
downloadSources = true,
},
configuration = {
updateBuildConfiguration = "interactive",
runtimes = {
{
name = "JavaSE-17",
path = "~/.sdkman/candidates/java/17.0.11-tem"
},
{
name = "JavaSE-21",
path = "~/.sdkman/candidates/java/21.0.3-tem",
},
},
}, according to the instructions here. Please note that Java 17 is working perfectly with JDTLS and NeoVim when I change the maven compiler properties to 17 instead of 21. Only Java 21 is not working. |
can you try setting absolute path to the JDKs? |
@fbricon I changed the path to absolute |
@rgrunber , @fbricon I see these errors in my
|
Can you confirm what version of language server you're using ? The stacktrace offsets of your logs seem to match a much older version of JDT-LS. These are lines 288 and 390 of JDTLanguageServer for 1.35.0 according to the stacktrace Line 288 in 6fcd088
Line 390 in 6fcd088
This is what they are in 1.17.0 : Line 288 in ac42091
Line 390 in ac42091
which corresponds a lot more to the casting exception. The only other thing that stands out is |
@rgrunber My installed JDTLS version is 1.35.0. PFA screenshot. |
Would you be able to open up a java project in NeoVim and in another terminal, run |
~ jps -lv |
Would there be a way to clear out |
@rgrunber It seems that Mason wasn't able to update jdtls to the latest version correctly, because the version of Mason installed as part of my distro LunarVim itself was very old. Since LunarVim is not maintained anymore, I had to change to a new distro AstroNvim to get the latest version of Mason, which in turn was able to install the latest version of jdtls. Thank you very much for the quick replies to help me fix my issue! |
Hi! I couldn't find an issue about JDK 20, 21 support, therefore I am creating this (more of a question, than an issue). I read in the README.md of the repo:
Is there a roadmap to support recent JDK versions? Sorry if this is too soon.
Also, I want to mention that there is no description of changes in the changelog for a given tag (I didn't check all, but here is an example: https://github.com/eclipse-jdtls/eclipse.jdt.ls/releases/tag/v1.28.0)
It's hard to see what were the changes.
The text was updated successfully, but these errors were encountered: