Summary
The javac command-line help for the --module
option should be changed to match the implementation.
Problem
The command line help for --module
/ -m
indicates that it only takes a single module-name as an argument. In fact, it accepts a comma-separated list of names.
In addition, this option is inconsistent with regard to other options that accept modules names. The command-line help for --module
uses <module-name>
, but other options just use <module>
to match the runtime behavior. The runtime equivalent for --module
also uses <module>
.
Solution
Update the command-line help to indicate that it accepts a comnma-separate list of module names, represented by <module>
Specification
$ hg diff
diff -r 28ec06beb091 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Tue Jan 08 13:04:04 2019 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Tue Jan 08 16:56:05 2019 -0800
@@ -44,7 +44,7 @@
javac.opt.sourcepath=\
Specify where to find input source files
javac.opt.m=\
- Compile only the specified module, check timestamps
+ Compile only the specified module(s), check timestamps
javac.opt.modulesourcepath=\
Specify where to find input source files for multiple modules
javac.opt.bootclasspath=\
@@ -108,7 +108,7 @@
javac.opt.arg.mspath=\
<module-source-path>
javac.opt.arg.m=\
- <module-name>
+ <module>(,<module>)*
javac.opt.arg.jdk=\
<jdk>|none
javac.opt.arg.dirs=\
With those edits, the command-line help for the --module
option will appear as follows:
--module <module>(,<module>)*, -m <module>(,<module>)*
Compile only the specified module(s), check timestamps
- csr of
-
JDK-8210561 Command-line help wrong for javac --module
-
- Resolved
-
- relates to
-
CCC-8142968 Module System implementation
-
- Closed
-