JDK9 EA Support

NetBeans IDE previews early experimental support for JDK 9 EA development builds including project Jigsaw, the new modular system for Java.
The NetBeans team is providing this as a preview of development work done in NetBeans IDE with the goal to have comprehensive support of JDK9 with modules (Jigsaw project) at the time of release of JDK 9. Features are not complete, at this stage, and WILL break in the future. JDK 9 and the Jigsaw project are also moving targets, which have not reached Feature Complete status yet.

The work started for Java SE support and projects (NB Ant project). Other areas like Java EE or Maven are not being worked on for JDK9 EA at this time. Later when Java SE support will be in desired state NetBeans developers of all other modules should start to use this for their work on making other NB modules to support JDK 9 EA and module system.

Sources and builds are available on AS IS basis without any warranty and testing. Bugs could be filled for JDK 9 EA support into bugzilla with Keyword JDK_9.

Features and UI is still being designed and will change. Don't use these builds for real work! A lot of exceptions ...

In some operating systems NetBeans, by default, launches on the most current JDK version available. Installing JDK 9 EA might cause the NB JDK 9 branch build, as well as other versions of Netbeans, to run with JDK 9. Although it is is possible to run the NB JDK 9 branch on JDK 9 (see below for instructions), you should consider configuring NetBeans (every version installed) to launch with JDK 8 (see Changing NetBeans JDK runtime platform below for instructions)

Project dependencies

Project can have also dependency on another JDK 9 EA modular (module-info.java) NB project. Use Project Properties | Libraries customizer to add another project either into modulepath or classpath. Use Add Project... button.

This customizer was redesigned from previous NetBeans versions to adapt to coexistence of modulepath and classpath in JDK 9.

JUnit tests

NetBeans currently supports JUnit tests which are part of same module as tested sources. If interested how modulepath, classpath, addExport, addmods, addReads are handled to run Junit tests then read this thread: JUnitTask + JDK9 question

The structure is very similar to non-modular Java development. Simply add JUnit tests into Test Packages or leverage existing JUnit tests in a project. Then run the tests using project context menu Test Alt+F6. Action Test File (Ctrl+F6) for single Java file does not work at this moment.

We are working on a way to allow JUnit tests to be stored in extra module inside Java SE project which is more complex use case.

Other Features

Module Dependency Graph

Running NetBeans on JDK9 EA as run time Java platform

It is possible to try this NetBeans build to run on JDK9 EA build as NetBeans IDE runtime platform. Use it with care as following command line switches might not be complete. Command lines for running NetBeans JDK 9 branch build on top of JDK9: