- JDK, version 11 or later upto JDK 22
- Ant, latest version
- Maven, latest version
- Node.js, latest LTS (to build VSIX)
$ git clone https://github.com/oracle/javavscode.git
$ cd javavscode/
$ git clone https://github.com/apache/netbeans.git
$ cd netbeans/
$ git checkout 22
$ cd ..
# the following target requires git executable to be on PATH:
$ ant apply-patches
$ ant build-netbeansTo build the VS Code extension invoke:
ant build-vscode-extThe resulting extension is then in the build directory, with the .vsix extension.
The typical file name is oracle-java-0.1.0.vsix.
If you want to develop the extension, use these steps for building instead:
ant build-lsp-serverThis target is faster than building the .vsix file. Find the instructions
for running and debugging below.
Often it is also important to properly clean everything. Use:
ant clean-vscode-ext
cd netbeans/
netbeans$ ant cleanThe java.lsp.server module has classical (as other NetBeans modules) tests.
The most important one is ServerTest
which simulates LSP communication and checks expected replies. In addition to
that there are VS Code integration tests - those launch VS Code with the
VS extension and check behavior of the TypeScript integration code:
$ ant build-vscode-ext # first and then
$ ant test-vscode-extIn case you are behind a proxy, you may want to run the tests with
$ npm_config_https_proxy=http://your.proxy.com:port ant test-vscode-extwhen executing the tests for the first time. That shall overcome the proxy
and download an instance of code to execute the tests with.