Does lsp-java support java 11? · Issue #114 · emacs-lsp/lsp-java (original) (raw)
I'm having a good time with lsp-mode and lsp-java on most projects at work, which are targeting Java 8. However, for the couple of projects that are targeting Java 11, I immediately run into trouble, with the following message:
Java: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files [16777540]
and a lot of compile errors highlighted in the UI, especially on built-in types like Integer and String, like you'd get if running the wrong JDK. There is probably a misconfiguration on my part, but I can't find it.
The LSP session start looks like this:
!SESSION 2019-03-26 15:24:22.943 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
Command-line arguments: -data /home/fgabolde/.emacs.d/workspace/ --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
When running M-! java-version, I get:
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1, mixed mode, sharing)
JAVA_HOME is correctly set as well.
I updated the edt backend very recently, using lsp-java's built-in installer.
What am I doing wrong?