On Thu, 11 Sep 2025 12:13:04 GMT, Magnus Ihse Bursie <[email protected]> wrote:

>> In the static JDK image, a single humongous java executable is generated, 
>> and no other launcher, such as javac. This makes it impossible to run our 
>> jtreg tests, which assume these are present.
>> 
>> The solution is fortunately simply: we just need to add a bunch of trivial 
>> launchers, which are thin wrappers that execute the main java binary, with 
>> the proper arguments. This will result in the same behavior as the normal 
>> dynamic launchers, only that we will need to take the detour of launching 
>> another process instead of calling directly into the JLI library.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Remove debug code

src/java.base/windows/native/launcher/relauncher.c line 79:

> 77:             backslashes = 0;
> 78:         } else {
> 79:             // Backslashes not preceeding a quote is copied without 
> escaping

is -> are

src/java.base/windows/native/launcher/relauncher.c line 153:

> 151:     }
> 152: 
> 153:     // Our executable name (should not be quoted)

ok here, because the full path is being explicitly passed to CreateProcess.
If the command line is to be parsed and the executable path contains a space, 
CreateProcess does say it should be quoted.  It would be good to have a test 
case with a space in the executable path.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24380#discussion_r2349635960
PR Review Comment: https://git.openjdk.org/jdk/pull/24380#discussion_r2349667061

Reply via email to