JDK9Support

(Difference between revisions)
Line 1: Line 1:
-
<H1>About the NetBeans IDE JDK9 Branch Development Build</H1>
+
<H1>About the NetBeans IDE JDK9 Support in Development Build</H1>
-
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.
+
NetBeans development builds (master) contains support for JDK9 EA builds https://jdk9.java.net/. Using NetBeans daily development build it is possible to set JDK9 EA buils as NetBeans IDE Java Platform.
-
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 NetBeans development builds is to let you use JDK 9 in your own applications, not to run NetBeans IDE itself on top of JDK9, at this stage of NetBeans and JDK9 development.
==Getting Started==
==Getting Started==
-
# 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 Dev daily 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 NetBeans after NetBeans 8.1 release.
# 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]. Completed on 2015/06/18.
+
# [http://bits.netbeans.org/download/trunk/nightly/latest/ Download the NetBeans Dev daily build here].  
# 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''.
==What works==
==What works==
-
NetBeans JDK9 build supports:  
+
NetBeans Dev daily build supports:  
* Java SE projects
* Java SE projects
* JavaFX projects
* JavaFX projects
Line 28: Line 27:
[[image:Jdk-9-register-1.png‎]]
[[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:
Once you have registered JDK9, you're able to specify that a project should use it:
Line 42: Line 37:
===Javac used===
===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.
+
The NetBeans Dev daily 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.
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 [http://hg.openjdk.java.net/jdk9/jdk9/raw-file/tip/README| 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==
==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 [https://netbeans.org/bugzilla/enter_bug.cgi 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.
+
The NetBeans JDK9 support is in 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 [https://netbeans.org/bugzilla/enter_bug.cgi 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==
==FAQ==
 +
# Q: Is Jigsaw https://jdk9.java.net/jigsaw/ build supported?
 +
## A: Jigsaw support is not implemented in Development daily builds. It is being designed at this time as Jigsaw support will require significant changes in NetBeans Java Projects. Once NetBeans team has something to share with community we will state it here.
# Q: Is Java Shell http://openjdk.java.net/jeps/222 supported
# Q: Is Java Shell http://openjdk.java.net/jeps/222 supported
## A: Not at the moment
## A: Not at the moment
-
# Q: Is Jigsaw supported?
 
-
## 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
# Q: Are Variable Handles http://openjdk.java.net/jeps/193 supported
-
## A: Not by this NetBeans JDK9 build (2105/06/18) internal javac.
+
## A: Not yet.

Revision as of 15:18, 1 December 2015

Contents

About the NetBeans IDE JDK9 Support in Development Build

NetBeans development builds (master) contains support for JDK9 EA builds https://jdk9.java.net/. Using NetBeans daily development build it is possible to set JDK9 EA buils as NetBeans IDE Java Platform.

Note. NetBeans IDE itself does not run on JDK 9 builds yet. The focus of NetBeans development builds is to let you use JDK 9 in your own applications, not to run NetBeans IDE itself on top of JDK9, at this stage of NetBeans and JDK9 development.

Getting Started

  1. The NetBeans Dev daily 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 NetBeans after NetBeans 8.1 release.
  2. Download the latest JDK 9 Early access build from JDK 9 project snapshots page.
  3. Download the NetBeans Dev daily build here.
  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 Dev daily 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‎

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 Dev daily 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.


Bug reporting

The NetBeans JDK9 support is in 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 Jigsaw https://jdk9.java.net/jigsaw/ build supported?
    1. A: Jigsaw support is not implemented in Development daily builds. It is being designed at this time as Jigsaw support will require significant changes in NetBeans Java Projects. Once NetBeans team has something to share with community we will state it here.
  2. Q: Is Java Shell http://openjdk.java.net/jeps/222 supported
    1. A: Not at the moment
  3. Q: Are Variable Handles http://openjdk.java.net/jeps/193 supported
    1. A: Not yet.
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