Examples of some of the features of Jigsaw released in the Early Access build of JDK9.
The examples here are directly from the Project Jigsaw: Module System Quick-Start Guide, see http://openjdk.java.net/projects/jigsaw/quick-start.
- Greetings
- Greetings world
- Multi-module compilation
- Packaging
- Missing requires or missing exports
- Services
- The linker
- javac -Xmodule and java -Xoverride
Each example is enclosed in a folder of its own containing bash scripts to compile,
package and run the respective examples.
Note: the bash files provided should work on Linux and in theory on the MacOS as well.
For Windows we would have to manually convert the .sh files into .bat, with minor tweaks
should also work there. Happy to received a pull request for it.
Early Access build of Jigsaw JDK9 is available at https://jdk9.java.net/jigsaw/.
Please install the tree
command before moving forward:
- Linux
sudo apt-get install tree
- MacOSX
see http://apple.stackexchange.com/questions/128876/whats-the-equivalent-of-the-unix-tree-command-on-osx
The bash script getJigsawJDK.sh
helps download the latest Jigsaw JDK from Oracle.