VSApacheNetBeans, the Apache NetBeans Extension for Visual Studio Code, is created as a promotional tool by the Apache NetBeans community for VS Code users.
Install VSApacheNetBeans into VS Code, use it, and maybe you'll want to try the complete Apache NetBeans experience, which is Apache NetBeans.
VS Code already has support for Java, provided by an extension created by Red Hat, though what that extension misses are the following features that VSApacheNetBeans provides out of the box:
- Support for JDK 8. (The Red Hat extension requires JDK 11 or above.)
- Polyglot debugging.
- Support for OpenJDK projects.
Getting Started
Get VSApacheNetBeans from the VS Code market place, once it is available there.
Until then, download the Apache NetBeans Language Server extension and install it into VSCode via Install from VSIX...
Scenarios
Scenario 1: Hello World
1. Get an existing Java project, for example, Micronaut: https://micronaut.io/launch/
Don't forget to select Maven and Java. Generate the project, download it, extract it into local disk.
$ mkdir microdemo $ cd microdemo/ microdemo$ unzip ~/Downloads/microdemo.zip microdemo$ JAVA_HOME=/jdk-14 mvn install
2. Open the microdemo
folder in VSCode
3. Wait for message "Indexing completed" and then you can enjoy editing, code completion and other NetBeans goodies
Plus your VSCode now supports all the latest and greatest JDK14 coding structure:
var running = application.isRunning(); Assertions.assertTrue(running);
Can your VSCode do that with the RedHat extension on JDK 8? If not, install the Apache NetBeans VSCode extension!
Scenario 2: Polyglot Debugging
to be done...
Scenario 3: OpenJDK
to be done...