RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v13]

Mandy Chung mchung at openjdk.org
Thu Jan 18 21:40:17 UTC 2024


On Thu, 18 Jan 2024 13:37:12 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> > If I read the code correctly, the image created with this option will enable multi-hops unconditionally? i.e. no timestamp file created and disable the check completely. I think the .stamp file should be present in any image created without packaged modules.
> 
> The option is currently used in tests (and can also be used to verify binary equivalence of jlinking Java SE with and without packaged modules), which is a nice property to have. If the stamp file is present in one, but not the other this is sufficient to fail the equivalence test.

What I tried to point out is the following:

1. run `myruntime/bin/jlink` to create `image1` without packaged module
2. run `image1/bin/jlink` to create a runtime image will fail
3. run `image1/bin/jlink --ignore-modified-runtime` will successfully to create `image2`

I expect `image2/bin/jlink` should fail creating a runtime image since it's multi-hop.   Another scenario: If I modify `image2/conf/net.properties` , `image2/bin/jlink` should fail.  In both cases, `image2/bin/jlink --ignore-modified-runtime` will ignore the error and create the runtime image.

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

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


More information about the core-libs-dev mailing list