JDK 9 configuration options
Alan Bateman
Alan.Bateman at oracle.com
Fri Sep 9 16:04:35 UTC 2016
On 09/09/2016 16:31, Stephen Felts wrote:
> :
>
>
>
> 2. With the new argument syntax in JDK 9 build 132, the launcher arguments now match the command line arguments. That’s a big step in the right direction. However, duplicates are a fatal error. So doing
>
> export _JAVA_OPTIONS=-XX:VMOptionsFile=/mydir/jdk9args
> java @/mydir/jdk9args something
>
> fails.
>
> If one framework needs java.xml.bind and another framework uses the same module, that should just work. If one needs bind and another needs jdk.rmic, I shouldn’t have to concatenate the two framework argument files together and manually merge the add-modules arguments together. It seems conceptually simple to add the required lists together in java or javac. The same is true for other things like exports, module path, upgrade module path, patch module, etc.
>
In the case of --add-modules then Mandy and Harold have changes in
review on hotspot-runtime-dev and core-libs-dev to change this into a
repeating option (it's currently last one wins). There will be follow-on
work needed in javac and other tools to get things aligned. There is
related patch coming that will propose to update the exiting repeating
options (specifically --add-exports and --add-reads) to tolerate dups.
Again, the complete solution requires updates to javac, maybe jlink, to
get everything consistent. Assuming there aren't any issues when I would
expect JEP 261 be to updated to reflect these proposals.
-Alan
More information about the jigsaw-dev
mailing list