I am trying to experiment with project Jigsaw as per this link http://openjdk.java.net/projects/jigsaw/doc/quickstart.html
However, I cant find jmod
command in the Java 9 early access build. Similarly, javac emits an error message saying
javac: invalid flag: -modulepath".
Any idea? What is the best way to experiment with Jigsaw in Java 9?
Project Jigsaw is an umbrella project with the new features aimed at two aspects: the introduction of module system in the Java language. and its implementation in JDK source and Java runtime.
The module descriptor ( module-info. java ) needs to be located in the src/main/java directory. Maven will set up javac to use the appropriate module source path.
module-info. java file. It declares the dependencies within the module system and allows the compiler and the runtime to police the boundaries/access violations between the modules in your application.
Although the preparatory JEP 201 and JEP 220 are both present as of JDK 9 build 41, the main Jigsaw work for JSR 376 is not yet present.
In response to a similar question on the mailing list, about that quickstart guide:
This is a quick start documentation from the original Jigsaw prototype of a few years ago, I guess it's a reminder that some of these obsolete pages needs to be updated to make it clear that they are obsolete.
and about the current state of the work:
JSR 376 is just starting and so there isn't a JEP for the module system yet. It will all come in time.
So, as of March 2015, the OpenJDK 9 builds don't include Jigsaw support. The jigsaw-dev mailing list is the best place to look for progress. It also confirms that status:
So too early to be looking for options like -modulepath.
It's likely that Jigsaw-specific builds will be made available ahead of inclusion in the regular JDK 9 builds.
There are now early access builds available with Jigsaw
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With