-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
b140
Currently, if multiple --add-modules options are specified on the Java command line the last one wins and the previous ones are ignored.
Instead of ignoring the previous --add-modules options, have it combine all values so that
java --add-modules a --add-modules b
would be equivalent to: java --add-modules a,b
In addition, --add-exports and --add-reads options do not accept duplicated module/package and it is an error to attempt to export the same package more than once on the command-line.
Merging multiple --add-exports option with the same module/package appears in several options may not always be feasible (e.g. _JAVA_OPTIONS, _JAVAC_OPTIONS and argfiles etc).
This also proposes to change --add-exports and --add-reads CLI options to allow repeating with the same module/package.
Instead of ignoring the previous --add-modules options, have it combine all values so that
java --add-modules a --add-modules b
would be equivalent to: java --add-modules a,b
In addition, --add-exports and --add-reads options do not accept duplicated module/package and it is an error to attempt to export the same package more than once on the command-line.
Merging multiple --add-exports option with the same module/package appears in several options may not always be feasible (e.g. _JAVA_OPTIONS, _JAVAC_OPTIONS and argfiles etc).
This also proposes to change --add-exports and --add-reads CLI options to allow repeating with the same module/package.
- relates to
-
JDK-8167470 Option to turn on strict module system options checking
-
- Open
-
-
JDK-8165634 Support multiple --add-modules options on the command line
-
- Resolved
-