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
Wed Oct 25 10:23:08 UTC 2017
Updated: http://cr.openjdk.java.net/~sundar/8189777/webrev.03/
Thanks
-Sundar
On 24/10/17, 10:40 PM, mandy chung wrote:
>
>
> On 10/23/17 9:05 PM, Sundararajan Athijegannathan wrote:
>> 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.
>>
>
> That's right. The default module path is added before initJlinkConfig
> is called. Thanks for confirming that.
>
>> * 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.
>>
> There are three places creating a ModuleFinder,
> JlinkConfiguration::moduleFinder, JlinkTask::initJlinkConfig, and
> JlinkTask::newModuleFinder. It'd be good to refactor this e.g. all
> call the newModuleFinder method.
>
> Add a new JlinkConfiguration constructor takes a ModuleFinder and have
> the initJlinkConfig method to create a ModuleFinder with the default
> module path appended, if appropriate. line 254-265 in JlinkTask - the
> check of an empty module path is not needed. Instead it can test if
> java.base is found from JlinkConfiguration::finder.
>
> Mandy
More information about the jigsaw-dev
mailing list