NewAndNoteworthyNB9

Revision as of 20:08, 1 May 2017 by Mbalin (Talk | contribs)

NetBeans 9 runtime platforms are only JDK8 and JDK9. Until JDK9 is GA it is recommended to run NB9 on top of JDK8 which is more stable. JDK9 can be used as Projects Java Platform even NetBeans itself is running on top of JDK8.

Contents

Java Platform Module System Support

Java Application project extensions

NetBeans 9 supports JPMS (Jigsaw) to full extent. Modulepath was added as a crucial paradigm to NetBeans in addition to Classpath.

Standard NetBeans Java SE Project (Ant) can be a single JDK9 module simply by adding module-info.java into default package.

File:Add_module-info.png

module-info.java supports code completion,...

File:Module_info_CC.png

Full Edit - Compile - Debug and Profile cycle is supported. Java SE projects with JDK9 module can define dependencies on themselves using Project Libraries customizer dialog and by defining appropriate exports and requires in their module-info.java files.

File:ProjectDependencies.png

This picture shows dependency of 1 project on 2 other projects. The mix of projects with module-info.java or without it is allowed. Modulepath and Classpath are supported.

File:ModuleDependenciesGraph.png

It is possible to show module dependencies for each module-info.java.

Java SE Project allows to develop and store JUnit tests:

  1. inside same module. In this case no changes to develop and execute tests are needed in main module-info.java
  2. in its own JUnit JDK9 module (own module-info.java). In this case main module-info.java exports the tested packages and tests module-info. java requires application module and JUnit...

The picture below shows the structure of JavaSE projects with JUnit tests in same module and with own module:

File:JavaSEProjects.png

Java Modular Application Project type

New project called Java Modular project was added. This allows to develop several JDK9 modules in one NetBeans project (Ant based). Advantage of this project over several Java SE project each containing 1 module is that dependencies are simply managed by declaring appropriate exports and requires in module-info.java files and all modules in the project are being compiled at once.

File:NewMultiModule.png

Following picture depicts how Java Modular Project can look like.

File:MultimoduleStructure.png

Other Java 9 features

Every JavaSE (with module-info.java) or Java Modular App project can be packaged into JLink image allowing seamless distribution of app and required modules. File:JLinkDistro.png

HTML5 tags are supported in NetBeans editor and HTML5 JavaDoc can be generated using projects Properties | Documenting customizer.

Maven projects and JDK 9 modules

JavaShell

PHP

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo