RFR 8189777: jlink --module-path default value and automatic addition of $JAVA_HOME/jmods if java.base is missing

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Tue Oct 24 04:05:05 UTC 2017


Hi,

* ALL-MODULE-PATH case seems to be handled fine (in  private 
JlinkConfiguration initJlinkConfig() throws BadArgs { method). When no 
--module-path is specified, default module path is used and all default 
observable modules are added as root. I ran the command you mentioned 
and it worked fine.

* refactored JlinkConfiguration.moduleFinder as a static method. Note 
that we've to create ModuleFinder inside JlinkContiguration because we 
may change modulepaths in constructor (if java.base module is not found) 
and so new ModuleFinder has to be created anyway.

Updated webrev: http://cr.openjdk.java.net/~sundar/8189777/webrev.02/

Thanks,
-Sundar


On 24/10/17, 2:57 AM, mandy chung wrote:
> On 10/23/17 3:37 AM, Sundararajan Athijegannathan wrote:
>> Updated for getDefaultModulePath. moduleFinder uses three instance 
>> fields - modulepaths, limitmods and modules. We may have to pass all 
>> to the static method...
>>
>> http://cr.openjdk.java.net/~sundar/8189777/webrev.01 
>
> What happens to this command?
>    $ jlink --add-modules ALL-MODULE-PATH -output image
>
> It will use the default module path but there is no root module.
>
> On 10/23/17 7:33 AM, Alan Bateman wrote:
>>
>> The other alternative is to create the ModuleFinder before creating 
>> the JlinkConfiguration, that might be clearer overall.
>
> I like the idea passing ModuleFinder to JlinkConfiguration constructor 
> which is cleaner.
>
> Mandy


More information about the jigsaw-dev mailing list