On Thu, 14 Mar 2024 21:16:04 GMT, Erik Joelsson <er...@openjdk.org> wrote:

> About the configure options,
> 
> ```
>   --enable-keep-packaged-modules
>                           enable keeping of packaged modules in jdk image 
> [enabled]
>   --enable-runtime-link-image
>                           enable producing an image suitable for runtime 
> linking [disabled]
> ```
> 
> If `--enable-runtime-link-image` is enabled, the JDK image does not include 
> the packaged modules.

That's not true. Right now `--enable-runtime-link-image` modifies how the 
`lib/modules` image looks like (adds a bunch of extra resources). That's it. It 
doesn't modify the setup of packaged modules. Since it doesn't change them, I 
don't see a reason to not include them in the image. The difference is that if 
you do `rm -rf images/jdk/jmods` you can still run `jlink` while with a not 
runtime link enabled image, you cannot. `jmods` become truly optional. Why is 
that a problem?

> If `--enable-runtime-link-image --enable-keep-packaged-modules` are both 
> enabled, it should probably fail? @erikj79 should it?

It seems orthogonal to me whether or not packaged modules are enabled or not. 
If they are indeed there, the regular jlink happens based on packaged modules 
(without specifying a module path) as happens today. When there is no module 
path that includes `java.base`, and we have a runtime enabled image. The 
runtime image based link is performed.

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

PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-1999307995

Reply via email to