RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

Mandy Chung mchung at openjdk.org
Mon Jul 3 17:12:00 UTC 2023


On Mon, 3 Jul 2023 17:07:16 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 669:
>> 
>>> 667:          */
>>> 668:         private void genModuleDescriptorsMethod(ClassBuilder clb) {
>>> 669:             if (moduleInfos.size() <= 75) {
>> 
>> The plugin can take an optional argument to configure the max number of module infos to split in case it hits the limit in a future case.
>
> What I meant here is to change the `configure` method to allow the plugin to take an argument for example
> 
>     --system-modules batch-size=100
> 
> 
> This argument is optional.   If not specified, the default value is 75.    This way you can tune the batch-size if we hit the method size limit for whatever reason.   And the test can also verify with different size if appropriate.

`plugins.properties` needs to be updated to show the option added for this plugin.   

BTW, the current argument described in the usage is out-dated which needs update.

system-modules.argument=retainModuleTarget

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14408#discussion_r1251130100


More information about the core-libs-dev mailing list