RFR: 8311302: Implement JEP 493: Linking Run-Time Images without JMODs [v46]
Alan Bateman
alanb at openjdk.org
Fri Nov 8 10:29:02 UTC 2024
On Fri, 8 Nov 2024 09:58:13 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> test/langtools/tools/javac/plugin/AutostartPlugins.java line 33:
>>
>>> 31: * jdk.jlink
>>> 32: * @build toolbox.ToolBox toolbox.JavacTask toolbox.JarTask
>>> 33: * @run main/othervm AutostartPlugins
>>
>> Why do the two javac plugin tests changed to /othervm? I assume they fail with a JDK built with --generate-linkable-runtime but I can't immediately see why.
>
> jtreg patches the `java.base` module and those langtools tests *link* from the run-time image (in such a config). Having a patched JDK module is not supported (and I don't think we ever should). Running in a separate JVM doesn't have this problem. See https://github.com/openjdk/jdk/pull/14787/commits/d8e1e834508589725adb8d70acb862a1270678ca. Does that make sense?
That's okay, I wasn't initially sure why they were changed. I'm looking at JRTArchiveFile.toEntry and wondering there should be a follow-up issue (not this PR) to fail early if running on a patched run-time even though it would be an odd configuration to attempt to do that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1834095994
More information about the build-dev
mailing list