Apache NetBeans (incubating) 9.0 Features

Apache NetBeans 9.0 is the first release of the Apache NetBeans IDE, it was released on July 2018. Click here to download this release.

The main goals for this release are IP clearance of the Oracle code donation and Java 9 and Java 10 Support.

Features include:

Supporting Local Variable Type Inference

New hints, error handlers, and refactorings for transforming to/from the new JDK 10 "var" type:

  • New Hint to convert explicit variable type to 'var'.

New Hint to convert explicit variable type to 'var'

  • New Hint to Convert var type back to explicit type.

New Hint to Convert var type back to explicit type

  • New Error hint to split compound 'var' declaration.

Var is not supported in a compound variable declaration. This fix helps correct compilation error by splitting declaration into separate statements.

New Error hint to split compound 'var' declaration

  • New Error Hint for var Array declaration.

Var type is not supported for array initializer. This hint helps correct compilation errors by converting to explicit type by inferring the type of data in an array. This currently handles arrays of primitive or homogeneous types.

New Error Hint for var Array declaration

Supporting the Jigsaw Module System

Adding module-info.java

NetBeans 9 supports JPMS (Jigsaw).

Modulepath was added as a paradigm to NetBeans in addition to Classpath.

The standard NetBeans Java SE Project Type (Ant based) can be a single JDK 9 module simply by adding a module-info.java file into the default package.

Autocompletion in module-info.java

Of course, we provide full autocompletion for module-info.java

A brand new Java Modular Application project type

Java Modular Application

We have added a new Java Modular project type. This allows to develop several JDK9 modules in one NetBeans project (Ant based).

The advantage of this project type over several Java SE projects (each containing one module) is that dependencies are simply managed by declaring appropriate exports and requires in module-info.java, and all modules in the project will be compiled at once.

Java Shell support

Java Shell Support

Java Shell is a new tool included in JDK9 defined in JEP 222 to introduce REPL (read-eval-print-loop) capabilities to Java.

NetBeans provides integrated console-like UI for the Java Shell, leveraing NetBeans editor capabilites.

NetBeans can support the tool with the user project configuration, so the Java Shell is set up to work with project classes and libraries, providing autocompletion out of the box in the editor.

Shell Agent Configuration

Also NetBeans greatly extends the capabilities of the commandline tool. NetBeans can execute the shell as an agent, similar to a debugging agent, on the debugged or run application (currently only J2SE applications are supported, both Ant and Maven-based).

Saving JShell snippets

Snippets written in JShell can be redefined and tested, even against a running code.

When the prototype is ready, it can be saved to a regular Java source file and integrated with the project.