On Thu, 3 Apr 2025 14:09:58 GMT, Alan Bateman <al...@openjdk.org> 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.
>
> Right now, the static-jdk image is a bit strange in that it's a modular 
> run-time image but with all native code compiled into bin/java. In time we 
> hope that jlink will be able to create a static image where everything is in 
> the single executable, so no bin directory (or any directory) for launchers. 
> I don't object to doing something to help testing the intermediate step, just 
> not sure that main line is the right place for this. 
> 
> As regards the shim when I wonder if it should use CreateProcessW but maybe 
> it doesn't matter for the test environments where they will run.

> @AlanBateman @jianglizhou Now that Erik has approved the build functionality, 
> I'd appreciate if anyone of you could approve as well, then I can finally 
> integrate this.

I think it's okay, and good for testing. I went through the relauncher closely, 
just not 100% sure of the quoting in the Windows implementation so I'm hoping 
Roger will have a few mins to scan that function.

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

PR Comment: https://git.openjdk.org/jdk/pull/24380#issuecomment-3293033509

Reply via email to