On Sun, 17 Jan 2021 12:55:35 GMT, David Holmes <[email protected]> wrote:
>> Alex Menkov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Non-lava launchers should process all "-J" arguments
>
> Alex,
>
> This approach results in two scans of the argument list in the IsJavaArgs
> case. I don't know if we care about startup in the non-Java launchers, but
> this will likely affect it.
>
> David
@dholmes-ora
> This approach results in two scans of the argument list in the IsJavaArgs
> case. I don't know if we care about startup in the non-Java launchers, but
> this will likely affect it.
The impact is minimal (cycle through args, check if it starts from the string).
As far as I see to avoid extra scans JLI_Launch code needs to be reordered:
CreateExecutionEnvironment();
if (IsJavaArgs()) {
TranslateApplicationArgs(jargc, jargv, &argc, &argv);
}
ParseArguments(&argc, &argv, &mode, &what, &ret, jrepath);
LoadJavaVM();
And handle NMT arg in ParseArguments
But this change would be much more risky.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2106