RFR: JDK-8217792 : Investigate what modules are included

Andy Herrick andy.herrick at oracle.com
Wed Jan 30 23:57:33 UTC 2019



On 1/30/2019 6:46 PM, Mandy Chung wrote:
> On 1/30/19 2:05 PM, Andy Herrick wrote:
>> Please review the jpackage fix for bug [1] at [2].
>>
>> This is a fix for the JDK-8200758-branch branch of the open sandbox 
>> repository (jpackage).
>>
>> JDK-8217792 : Investigate what modules are included
>>
>> For modules included in the runtime of a non-modular application, we 
>> now computes all modules that export an API as the root modules and 
>> compute their transitive closure, and do service binding.  As a 
>> result, by default you get all modules except 10 internal modules.
>>
>> For jre-installer (without --runtime-image option) we revert to 
>> including all modules.
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8217792
>>
>> [2] http://cr.openjdk.java.net/~herrick/8217792/webrev.03/
>
>  368         ModuleFinder finder = ModuleFinder.ofSystem();
>
> This means that you assume that the JMOD files used for linking
> is the same version as the system module path.  This assumption
> is fine since jlink currently does not support linking a different
> version.
yes - this code is only used if building an app to run on the current 
jdk. (the jdk with jpackage in it.)
When using --runtime-image , the whole runtime-image pointed to is 
included in the app, so we should be advising users to run jlink first 
to create a suitable runtime-image, or to otherwise provide a runtime 
image with only what their app might want.

/Andy

>
> You may want to add a comment if it helps.
>
> Mandy



More information about the core-libs-dev mailing list