lsp-java icon indicating copy to clipboard operation
lsp-java copied to clipboard

Support for newest version of JDK 20, 21?

Open oscarvarto opened this issue 2 years ago • 4 comments

Sorry if this is too soon. It seems that eclipse.jdtls already supports JDK 20

https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/2898#issuecomment-1752102021

Will we have support for JDK 21 in emacs too?

oscarvarto avatar Oct 09 '23 05:10 oscarvarto

Right now, lsp-java is downloading an older version of eclipse-jdtls (1.23.0), which doesn't support Java 21. eclipse-jdtls 1.35.0 supports up to Java 22. Can we please get an updated release of lsp-java?

https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request

nithin-mk avatar May 29 '24 15:05 nithin-mk

To download on Java 21, I also had to (setenv "MAVEN_OPTS" "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED")

ArneBab avatar Jul 05 '24 17:07 ArneBab

@ArneBab In which file should I set those options?

nithin-mk avatar Jul 05 '24 18:07 nithin-mk

I just put that in my init.el into the use-package declaration of lsp-java. I don’t have it working correctly at the moment, though ⇒ more problems to solve. This change just enables downloading jdtls with modern Java installed.

ArneBab avatar Jul 05 '24 21:07 ArneBab