JDK9Support

(Difference between revisions)
m
Line 2: Line 2:
This development build of NetBeans IDE from its jdk9 branch is a prototype prepared to support JDK9, namely its modular system (Project [http://openjdk.java.net/projects/jigsaw/ Jigsaw]). It is intended for early adopters of Java 9. The NetBeans JDK9 build is distributed as a Java SE NetBeans distribution enabling the JDK9 Early access build to be recognized as a Java Platform by NetBeans IDE.
This development build of NetBeans IDE from its jdk9 branch is a prototype prepared to support JDK9, namely its modular system (Project [http://openjdk.java.net/projects/jigsaw/ Jigsaw]). It is intended for early adopters of Java 9. The NetBeans JDK9 build is distributed as a Java SE NetBeans distribution enabling the JDK9 Early access build to be recognized as a Java Platform by NetBeans IDE.
 +
The build is from '''June 18th, 2015''' and as such it supports JEPs and other development done in JDK9 EA up to this date, e.g. JEP 193 Variable Handles is not supported by this NetBeans JDK9 build.
'''Note.''' NetBeans IDE itself does not run on JDK 9 builds yet. The focus of this development build of the NetBeans IDE from jdk9 branch is to let you use JDK 9 in your own applications, not to run NetBeans IDE itself.
'''Note.''' NetBeans IDE itself does not run on JDK 9 builds yet. The focus of this development build of the NetBeans IDE from jdk9 branch is to let you use JDK 9 in your own applications, not to run NetBeans IDE itself.
Line 9: Line 10:
# The NetBeans JDK9 branch build runs on top of Java SE 8, you can download the latest update of [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java SE 8 here]. JDK 7 and older is not supported by this build of NetBeans.
# The NetBeans JDK9 branch build runs on top of Java SE 8, you can download the latest update of [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java SE 8 here]. JDK 7 and older is not supported by this build of NetBeans.
# Download the latest JDK 9 Early access build from [https://jdk9.java.net/ JDK 9 project snapshots] page.  
# Download the latest JDK 9 Early access build from [https://jdk9.java.net/ JDK 9 project snapshots] page.  
-
# [https://netbeans.org/downloads/jdk9-branch/2015-06-18/ Download the NetBeans JDK9 branch build here.]
+
# [https://netbeans.org/downloads/jdk9-branch/2015-06-18/ Download the NetBeans JDK9 branch build here]. Completed on 2015/06/18.
# Register the latest JDK 9 Early access build as a ''Java Platform'' in NetBeans JDK9 build by means of ''Tools | Java Platforms | Add Platform''.  
# Register the latest JDK 9 Early access build as a ''Java Platform'' in NetBeans JDK9 build by means of ''Tools | Java Platforms | Add Platform''.  
# Once the above is done, the JDK 9 Early access build can be selected in the NetBeans ''Project Properties dialog > Libraries | Java Platform''.
# Once the above is done, the JDK 9 Early access build can be selected in the NetBeans ''Project Properties dialog > Libraries | Java Platform''.
Line 41: Line 42:
===Javac used===
===Javac used===
-
The NetBeans JDK9 build uses JDK 9 Javac. In current builds of javac, there are no limitations except it '''compiles only java sources with -source option 1.6 and higher'''. Source level 1.5 and older is not supported by JDK9 javac.
+
The NetBeans JDK9 build uses JDK 9 Javac internally. In current builds of javac, there are no limitations except it '''compiles only java sources with -source option 1.6 and higher'''. Source level 1.5 and older is not supported by JDK9 javac.
 +
 
 +
Turn OFF '''Compile on Save''' in Project properties dialog ''Build | Compiling'' in a case javac from JDK 9 Java Platform needs to be used for '''Build''' or '''Clean & Build''' actions. This is useful in case your project uses Java Platform built from latest JDK9 sources with features not available in NB internal Javac.
===JDK Project for NetBeans===
===JDK Project for NetBeans===
Line 55: Line 58:
# Q: Is Jigsaw supported?
# Q: Is Jigsaw supported?
## A: It is supported to the extent it is provided in [https://jdk9.java.net/ JDK9] build
## A: It is supported to the extent it is provided in [https://jdk9.java.net/ JDK9] build
 +
# Q: Are Variable Handles http://openjdk.java.net/jeps/193 supported
 +
## A: Not by this NetBeans JDK9 build (2105/06/18) internal javac.

Revision as of 08:17, 24 July 2015

Contents

About the NetBeans IDE JDK9 Branch Development Build

This development build of NetBeans IDE from its jdk9 branch is a prototype prepared to support JDK9, namely its modular system (Project Jigsaw). It is intended for early adopters of Java 9. The NetBeans JDK9 build is distributed as a Java SE NetBeans distribution enabling the JDK9 Early access build to be recognized as a Java Platform by NetBeans IDE. The build is from June 18th, 2015 and as such it supports JEPs and other development done in JDK9 EA up to this date, e.g. JEP 193 Variable Handles is not supported by this NetBeans JDK9 build.

Note. NetBeans IDE itself does not run on JDK 9 builds yet. The focus of this development build of the NetBeans IDE from jdk9 branch is to let you use JDK 9 in your own applications, not to run NetBeans IDE itself.

Getting Started

  1. The NetBeans JDK9 branch build runs on top of Java SE 8, you can download the latest update of Java SE 8 here. JDK 7 and older is not supported by this build of NetBeans.
  2. Download the latest JDK 9 Early access build from JDK 9 project snapshots page.
  3. Download the NetBeans JDK9 branch build here. Completed on 2015/06/18.
  4. Register the latest JDK 9 Early access build as a Java Platform in NetBeans JDK9 build by means of Tools | Java Platforms | Add Platform.
  5. Once the above is done, the JDK 9 Early access build can be selected in the NetBeans Project Properties dialog > Libraries | Java Platform.

What works

NetBeans JDK9 build supports:

  • Java SE projects
  • JavaFX projects
  • NetBeans Ant project
  • Maven projects
  • Debugging
  • Profiling of JDK9 VM from NetBeans JDK9 build
  • All Editing features work
  • All other features unrelated to Java language like SCM work.

Register JDK9 as a NetBeans Java Platform. You will see something like this:

image:Jdk-9-register-1.png‎

In contrast, if you were to attempt to register JDK9 in the latest NetBeans Dev build (i.e., the build focused on NetBeans IDE 8.1), NetBeans IDE does not recognize it correctly, as shown below:

image:Jdk-9-register-2.png‎

Once you have registered JDK9, you're able to specify that a project should use it:

image:Jdk-9-build-switch.png‎

Working with Java sources in a project targeting JDK9 is seamless, all features work, e.g., code completion:

image:Jdk-9-build-cc.png

Javac used

The NetBeans JDK9 build uses JDK 9 Javac internally. In current builds of javac, there are no limitations except it compiles only java sources with -source option 1.6 and higher. Source level 1.5 and older is not supported by JDK9 javac.

Turn OFF Compile on Save in Project properties dialog Build | Compiling in a case javac from JDK 9 Java Platform needs to be used for Build or Clean & Build actions. This is useful in case your project uses Java Platform built from latest JDK9 sources with features not available in NB internal Javac.

JDK Project for NetBeans

The NetBeans JDK9 build features the JDK Project for NetBeans plugin in its Plugin Portal. Go to Tools | Plugins to install it. Then follow instructions available on https://jdk9.java.net/ including the build of OpenJDK9. After this it is possible to open some OpenJDK9 module e.g. java.base in NetBeans and it is recognized as NetBeans project. This plugin is provided for Java 9 development to simplify JDK project setup in the NetBeans JDK9 build.

Bug reporting

The NetBeans JDK9 branch build is in a very early stage of development and JDK9 itself has not reached its feature complete status. Therefore, it is possible that you will encounter instabilities, while some features might not work when JDK9 is used as a Java Platform for your projects. Please provide us feedback on the build, either by using Bugzilla reports use JDK_9 keyword to mark bugs found when using JDK9 build, or by sending an e-mail to us at the nbusers@netbeans.org mailing list -- please put [JDK9] in the subject of your email.

FAQ

  1. Q: Is Java Shell http://openjdk.java.net/jeps/222 supported
    1. A: Not at the moment
  2. Q: Is Jigsaw supported?
    1. A: It is supported to the extent it is provided in JDK9 build
  3. Q: Are Variable Handles http://openjdk.java.net/jeps/193 supported
    1. A: Not by this NetBeans JDK9 build (2105/06/18) internal javac.
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