Apache NetBeans Language Server Extension for VS Code
12.4 Beta release
This is a technology preview of Apache NetBeans
based extension for VS Code. Use it to get all the goodies of NetBeans
via the VS Code user interface! Run on JDK8*, JDK11, JDK15, etc.
Invoke "Open Folder" action to open project directories with
build scripts. Edit, compile and debug (with the Java 8+ debugger configuration)
.java application and test files in such projects. Debug not only Java code,
to set your environment up to support
typical development use-cases.
- Java: Compile Workspace - invoke Maven or Gradle build
- GraalVM: Pause in Script - place a breakpoint into first executed polyglot script
- Debugger Java 8+ - start test or main class on JDK8+ in polyglot mode
- Progress shown for long running operations with cancel support for selected types
- Native Image Debugger is a new Run configuration added which allows Java style debugging of Ahead of Time compiled native-images, produced by GraalVM. It is experimental feature which works with GDB on Linux. GDB 7.11 or GDB 10.1 is required due to known issue #26139 in GDB 8 and 9.
- Micronaut and Spring support especially for YAML configuration files with code completion and source code navigation to Java.
- Test Explorer for Java tests results visualization and execution including editor code Lenses.
- Improved Maven and Gradle support including multi-project projects, subprojects opening and Gradle priming builds.
Class level refactorings as well as variable refactorings are supported in VSCode via Apache NetBeans extension. See following screenshots:
Some refactorings are two steps with like Override method ... where method to be overriden is selected in 2nd step:
- netbeans.jdkhome - path to the JDK, see dedicated section below
- netbeans.verbose - enables verbose extension logging
- netbeans.conflict.check - avoid conflicts with other Java extensions, see below
Selecting the JDK
The user projects are built, run and debugged using the same JDK which runs the
Apache NetBeans Language Server. The JDK is being searched in
netbeans.jdkhome setting (workspace then user settings)
java.home setting (workspace then user settings)
JDK_HOME environment variable
JAVA_HOME environment variable
- current system path
As soon as one of the settings is changed, the Language Server is restarted.
Conflicts with other Java Extensions
Apache NetBeans Language Server extension isn't the only Java supporting
extension. To avoid duplicated code completion and other misleading clashes
the extension disables certain functionality known to cause problems. This
behavior can be disabled by setting
netbeans.conflict.check setting to
Read building instructions to help Apache community to
improve the extension.