RFR 9: JDK-8178012: Finish removal of -Xmodule:

Jan Lahoda jan.lahoda at oracle.com
Tue Apr 11 17:26:38 UTC 2017


Hi,

javac used to have an option, -Xmodule:, that allowed to compile given 
sources as if they were part of the specified module.

This functionality has been merged into the --patch-module option, but 
the -Xmodule: option couldn't be fully removed at that time, as some 
tests and tools (e.g. jtreg) depended on it. The option was however 
removed from the javac help, etc.

Since jtreg can use --patch-module instead of -Xmodule: now, I'd like to 
propose further demoting the option to an unsupported -XD-Xmodule: 
setting (the functionality is not removed completely, as there is a 
small amount of remaining dependencies). The option may be removed 
completely eventually when the remaining dependencies are resolved.

The patch spans many repositories besides langtools, as it adjusts 
TEST.ROOT files, and the 
<top-level>/test/lib/jdk/test/lib/InMemoryJavaCompiler.java. The latter 
is used by hotspot tests, and this change is a small tweak to translate 
-Xmodule: to --patch-module. This could be later improved by enhancing 
the test library API to pass the module name explicitly.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8178012

Webrev:
http://cr.openjdk.java.net/~jlahoda/8178012/webrev.00/

Any feedback is welcome.

Thanks,
     Jan


More information about the core-libs-dev mailing list