JigsawSupport
(8 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<h1>JDK9 Jigsaw Support</H1> | <h1>JDK9 Jigsaw Support</H1> | ||
- | NetBeans IDE previews an early experimental support for [http://openjdk.java.net/projects/jigsaw/ | + | NetBeans IDE previews an early experimental support for [http://openjdk.java.net/projects/jigsaw/ Jigsaw project] which will be a part of JDK9. |
NetBeans team provides this as a preview of development work done in NetBeans IDE with a goal to have a good, usable support of JDK9 with modules (Jigsaw project) at a time of release of JDK9. Features are not complete and WILL break in the future. Jigsaw is also a moving target as it is not Feature complete yet. | NetBeans team provides this as a preview of development work done in NetBeans IDE with a goal to have a good, usable support of JDK9 with modules (Jigsaw project) at a time of release of JDK9. Features are not complete and WILL break in the future. Jigsaw is also a moving target as it is not Feature complete 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 Jigsaw 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 Jigsaw and JDK9. | 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 Jigsaw 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 Jigsaw and JDK9. | ||
- | Sources and builds are available on '''AS IS''' basis without any warranty. | + | Sources and builds are available on '''AS IS''' basis without any warranty. [https://netbeans.org/bugzilla/enter_bug.cgi Bugs could be filled] for Jigsaw support into bugzilla with Keyword '''JDK_9'''. |
- | Don't use these builds for real work! A lot of exceptions ... | + | |
+ | Features and UI is still being designed and will change. Don't use these builds for real work! A lot of exceptions ... | ||
NetBeans Jigsaw prototyping goes on in '''jet-main''' repository on a branch '''jdk9'''. Daily builds are available at http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ with JavaSE build available for download from http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ws/dist/zip/ | NetBeans Jigsaw prototyping goes on in '''jet-main''' repository on a branch '''jdk9'''. Daily builds are available at http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ with JavaSE build available for download from http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ws/dist/zip/ | ||
Line 23: | Line 24: | ||
* module-info.java support: editing works and using its statement to set module boundaries for projects | * module-info.java support: editing works and using its statement to set module boundaries for projects | ||
* All Editing features work according to what is declared in module-info.java | * All Editing features work according to what is declared in module-info.java | ||
- | * Using other NB Java SE Single module projects as libraries is possible | + | * Using other NB Java SE Single module projects as libraries (project dependency) is possible |
* Compilation works | * Compilation works | ||
+ | * Run & Debug projects work | ||
* All other features unrelated to Java language like SCM should work. | * All other features unrelated to Java language like SCM should work. | ||
==What DOES NOT work== | ==What DOES NOT work== | ||
- | At this moment ( | + | At this moment (Feb 23rd, 2016) all features not listed above don't work. Namely: |
- | * | + | * Unit tests support is not yet implemented. |
- | * | + | * Maven projects don't work |
== How to start == | == How to start == | ||
Line 45: | Line 47: | ||
[[image: Jigsaw_m-i.j.png]] | [[image: Jigsaw_m-i.j.png]] | ||
- | + | Project can have also dependency on another Jigsaw (module-info.java) NB project. Use Project Properties | Libraries customizer to add Jigsaw project under Modules tab using Add Project... button. | |
[[image: Jigsaw_Libs.png]] | [[image: Jigsaw_Libs.png]] | ||
- | |||
== Other Features == | == Other Features == | ||
===Module Dependency Graph=== | ===Module Dependency Graph=== | ||
The '''Graph''' View of the module-info.java file provides module dependency graph. | The '''Graph''' View of the module-info.java file provides module dependency graph. | ||
+ | |||
[[image: ModuleGraph.png]] | [[image: ModuleGraph.png]] | ||
+ | |||
+ | ==Running NetBeans on JDK9 and JDK9 with project Jigsaw== | ||
+ | It is possible to try this NetBeans build run on JDK9 EA build or Jigsaw build. Use it with care as following command line switches might not be complete. Command lines for running NetBeans Jigsaw support on top of JDK9 | ||
+ | |||
+ | ====Linux==== | ||
+ | <pre> $ bin/netbeans --jdkhome ~/jigsaw_b96 -J-XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED,\ | ||
+ | java.desktop/java.awt.peer=ALL-UNNAMED,java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED,\ | ||
+ | java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED | ||
+ | </pre> | ||
+ | ====Mac OSX==== | ||
+ | <pre> $ bin/netbeans --jdkhome ~/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home -J-XaddExports:java.desktop/com.apple.eawt=ALL-UNNAMED,\ | ||
+ | java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED,java.desktop/apple.laf=ALL-UNNAMED,java.desktop/java.awt.peer=ALL-UNNAMED,\ | ||
+ | java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED | ||
+ | </pre> | ||
+ | ====Windows==== | ||
+ | <pre> > bin\netbeans.exe --jdkhome C:\jigsaw -J-Djdk.launcher.addexports=java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED, | ||
+ | java.desktop/java.awt.peer=ALL-UNNAMED,java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED, | ||
+ | java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED | ||
+ | </pre> |
Current revision as of 09:32, 18 March 2016
Contents |
JDK9 Jigsaw Support
NetBeans IDE previews an early experimental support for Jigsaw project which will be a part of JDK9. NetBeans team provides this as a preview of development work done in NetBeans IDE with a goal to have a good, usable support of JDK9 with modules (Jigsaw project) at a time of release of JDK9. Features are not complete and WILL break in the future. Jigsaw is also a moving target as it is not Feature complete 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 Jigsaw 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 Jigsaw and JDK9.
Sources and builds are available on AS IS basis without any warranty. Bugs could be filled for Jigsaw 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 ...
NetBeans Jigsaw prototyping goes on in jet-main repository on a branch jdk9. Daily builds are available at http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ with JavaSE build available for download from http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ws/dist/zip/
Getting Started
- The NetBeans Jigsaw 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.
- Download the latest JDK 9 Early Access with Project Jigsaw build from https://jdk9.java.net/jigsaw page.
- Download NB Jigsaw dev build from http://deadlock.netbeans.org/job/NB-for-JDK9_jigsaw/ws/dist/zip/ or build it from sources.
- Register the latest JDK 9 with Jigsaw build as a Java Platform in NetBeans JDK9 build by means of Tools | Java Platforms | Add Platform.
What works
NetBeans Jigsaw builds supports:
- NB Java SE project support one Jigsaw module - Single module project.
- module-info.java support: editing works and using its statement to set module boundaries for projects
- All Editing features work according to what is declared in module-info.java
- Using other NB Java SE Single module projects as libraries (project dependency) is possible
- Compilation works
- Run & Debug projects work
- All other features unrelated to Java language like SCM should work.
What DOES NOT work
At this moment (Feb 23rd, 2016) all features not listed above don't work. Namely:
- Unit tests support is not yet implemented.
- Maven projects don't work
How to start
Add JDK9 Jigsaw as a Java Platform
After adding Jigsaw as Java Platform to NetBeans create Jave SE project using New Project wizard. Then add module-info.java. It is available under New File templates in category Java.
java.base module is by default added to any Jigsaw app. You can now edit module-info.java with requires,...
Project can have also dependency on another Jigsaw (module-info.java) NB project. Use Project Properties | Libraries customizer to add Jigsaw project under Modules tab using Add Project... button.
Other Features
Module Dependency Graph
The Graph View of the module-info.java file provides module dependency graph.
Running NetBeans on JDK9 and JDK9 with project Jigsaw
It is possible to try this NetBeans build run on JDK9 EA build or Jigsaw build. Use it with care as following command line switches might not be complete. Command lines for running NetBeans Jigsaw support on top of JDK9
Linux
$ bin/netbeans --jdkhome ~/jigsaw_b96 -J-XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED,\ java.desktop/java.awt.peer=ALL-UNNAMED,java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED,\ java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED
Mac OSX
$ bin/netbeans --jdkhome ~/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home -J-XaddExports:java.desktop/com.apple.eawt=ALL-UNNAMED,\ java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED,java.desktop/apple.laf=ALL-UNNAMED,java.desktop/java.awt.peer=ALL-UNNAMED,\ java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED
Windows
> bin\netbeans.exe --jdkhome C:\jigsaw -J-Djdk.launcher.addexports=java.desktop/sun.awt=ALL-UNNAMED,java.base/jdk.internal.jrtfs=ALL-UNNAMED, java.desktop/java.awt.peer=ALL-UNNAMED,java.desktop/com.sun.beans.editors=ALL-UNNAMED,java.desktop/sun.awt.im=ALL-UNNAMED, java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED,java.management/sun.management=ALL-UNNAMED