On Wed, 19 Mar 2025 02:02:56 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:

>> Please review this PR that adds `@requires !jdk.static` to tests, thanks.
>> 
>> - runtime/StackGap/TestStackGap.java
>> - runtime/StackGuardPages/TestStackGuardPages.java
>> - runtime/TLS/TestTLS.java
>> - runtime/jni/daemonDestroy/TestDaemonDestroy.java
>> - runtime/jni/getCreatedJavaVMs/TestGetCreatedJavaVMs.java
>> - jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java
>> - jdk/jni/nullCaller/NullCallerTest.java
>> - jdk/tools/launcher/JniInvocationTest.java
>> 
>> These tests use native executables that have dependencies on `libjvm.so`, 
>> `libjli.so`, etc. Static JDK does not provide the separate JDK/VM shared 
>> libraries, hence cannot support the specific testing mode.
>
> I filed https://bugs.openjdk.org/browse/JDK-8352305.

> @jianglizhou shouldn't these native executables be built differently to work 
> with the static JDK? Otherwise how does a user create a native executable 
> that launches the JVM?

Right now, jlink creating a modular run-time image, can generate a launch 
script in the image bin directory. If/when support for creating a static image 
comes then it will generate a native executable that runs the application. 
Configuration that is provided at launch time may need to be provided at link 
time. In that world then it's not clear if there is a real need for custom 
launcher code. As Jiangli says, we haven't discussed this yet, so can't rule 
anything in or out right now.

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

PR Comment: https://git.openjdk.org/jdk/pull/24103#issuecomment-2735857307

Reply via email to