On Sun, 29 Sep 2024 04:11:53 GMT, Ioi Lam <ik...@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

Reply via email to