RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time [v4]

Calvin Cheung ccheung at openjdk.org
Tue Oct 1 17:24:39 UTC 2024


On Sun, 29 Sep 2024 04:11:53 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> It should work because the jmod file won't be added to the `module_paths`.
>
> In my scenario, will the FMG be used? If so, the program won't be able to load the code in mod2.jmod, so the behavior will be wrong. Could you add a test case for this?

It turns out that jmod cannot be used during runtime.
>From `jdk.intenal.module.ModulePath`:

            // not recognized
            String msg;
            if (!isLinkPhase && entry.toString().endsWith(".jmod")) {
                msg = "JMOD format not supported at execution time";
            } else {
                msg = "Module format not recognized";
            }

I added some tests with jmod.

>> I'm not sure. Is your suggest equivalent to:
>>   `return (strcmp(key, "jdk.module.path"));`
>
> Yes, the C++ compiler will automatically concatenate `MODULE_PROPERTY_PREFIX PATH` into a single string.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21048#discussion_r1783230047
PR Review Comment: https://git.openjdk.org/jdk/pull/21048#discussion_r1783230247


More information about the hotspot-dev mailing list