-
Notifications
You must be signed in to change notification settings - Fork 442
Javac‐based compilation support
As of version 1.36.0, vscode-java has experimental support for Javac-based compilation. Instead of compiling projects with Eclipse JDT's ECJ compiler, it uses javac
while satisfying the underlying models that would have relied on ECJ. This means we continue to provide all features of the language server as before.
- The
javac
-based compiler currently requires a JDK 23 be configured to start the language server. As a result, users should setjava.jdt.ls.java.home
to the folder containing the JDK 23 installation. - Set
java.jdt.ls.javac.enabled
toon
(Default isoff
)
You may be prompted to restart VS Code for the changes to take effect, but subsequent project imports will occur through javac
.
While java.jdt.ls.javac.enabled
handles building and most other features, we have created a separate option java.completion.engine
(Default is ecj
), that allows configuring which option (ecj
, or dom
) is used for the completion engine. With the dom
option, the completion engine consumes the model generated by the javac
-based compilation.