On Tue, 4 Feb 2025 19:04:22 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Also to point it out if it's not clear already, `libjvm.so` is >> implementation detail. One cannot safely that exists at runtime. The static >> JDK case is a good example. > >> @jianglizhou I will be brutally honest and say that I do not like this at >> all. Does this mean all JNI using tests/applications have to becoded >> differently to be used with a static JDK? I find it somewhat ironic that to >> work with a static JDK we have to rewrite the test to perform a dynamic >> lookup! > > A custom launcher will typically link to libjvm or use dlopen/dlym to get to > JNI_CreateJavaVM. A static build isn't really suitable for custom launchers > (or anything that embeds a VM). > > So I think the changes to the test are okay if we really want to run this > test with a static build. An alternative is to have the tests that use > JNI_CreateJavaVM to not be selected. At some point I suspect we'll need to > add a property to jtreg-ext/requires/VMProps.java for these builds anyway. @AlanBateman I created https://github.com/openjdk/jdk/pull/23528 for the VMProps change. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23431#issuecomment-2644342524