如何使用 Java 9 的拼图

How to use jigsaw with Java 9

我正在尝试按照此 link http://openjdk.java.net/projects/jigsaw/doc/quickstart.html

项目 Jigsaw

但是,我在 Java 9 抢先体验版本中找不到 jmod 命令。类似地,javac 发出一条错误消息说

javac: invalid flag: -modulepath".

有什么想法吗?在 Java 9 中试验 Jigsaw 的最佳方法是什么?

虽然筹备JEP 201 and JEP 220 are both present as of JDK 9 build 41, the main Jigsaw work for JSR 376还没到

回应 a similar question on the mailing list,关于快速入门指南:

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.

关于工作现状:

JSR 376 is just starting and so there isn't a JEP for the module system yet. It will all come in time.

因此,截至 2015 年 3 月,OpenJDK 9 版本不包括 Jigsaw 支持。 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.

Jigsaw 特定版本可能会在包含在常规 JDK 9 版本中之前提供。

现在有early access builds available with Jigsaw

经过这么多延迟,最新消息是 Java 9 终于在 9 月 21 日发布。

请使用其发布的版本进行尝试,我们已经看到与 Java 9 相关的许多更改,希望它在 public 发布后稳定。

相关信息:http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-June/005867.html

顺便说一句:检查 java 9 状态的最佳位置是其架构师的推特:

https://twitter.com/mreinhold