RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v10]

Severin Gehwolf sgehwolf at openjdk.org
Thu Nov 30 10:16:11 UTC 2023


On Wed, 29 Nov 2023 22:01:57 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Tighten ModifiedFilesExitTest
>>   
>>   Ensure the error message is reasonable and doesn't include
>>   Exceptions presented to the user.
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 286:
> 
>> 284:             }
>> 285: 
>> 286:             boolean useModulePath = !options.modulePath.isEmpty();
> 
> Is there any reason why the run-time image based linking is only supported if `--module-path` is not specified?   Linking user modules specified on the module path with the run-time image seems useful.   If the module exists in the given module path and the run-time image, the modules from the module path should probably take precedence but it needs to work through the details and potential issues.

I haven't looked into the details, but the common case is for jlink users to use the default module path (`jmods` folder of the JDK install) and the prime use-case for this is to get away with performing a link without the packaged modules (no "external" dependency if you will; of that `jmods` folder). It could be considered as a follow-up. In this patch I wouldn't want to complicate it further if that sounds OK?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1410450707


More information about the core-libs-dev mailing list