Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8162401

Support multiple --add-exports and --add-reads with the same module/package

XMLWordPrintable

    • 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.

            mchung Mandy Chung (Inactive)
            hseigel Harold Seigel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: