-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b24
-
generic
-
generic
$ ./jdk-22/bin/jlink --add-modules jdk.jlink,java.base --output jdk22-jlink-min
$ ./jdk22-jlink-min/bin/jlink --add-modules java.base --output java-base-runtime
Error: --module-path is not specified and this runtime image does not contain jmods directory.
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
Use cases in the container world include providing a JDK in layer A and adding the application in layer B. It would be nice to support layer C: Application + only needed modules for that application *without* packaged modules present in layer A. Allowing the jlink feature on a JDK without packaged modules has size advantages as compared to the packaged modules workflow. For example for JDK 22+4 we see this on Linux:
$ du -sh ./jdk-22/
350M ./jdk-22/
$ du -sh ./jdk-22/jmods
89M ./jdk-22/jmods
One limitation of such a feature would be that it's not possible to use this mode in a cross-link setup (i.e. jlink a runtime on platform A which targets platform B given a JDK with packaged modules is available on host A for platform B).
- blocks
-
JDK-8343839 Detect patched modules and abort run-time image link early
- Resolved
-
JDK-8333541 Remove the restriction of directory based modules for runtime image linking
- Closed
- csr for
-
JDK-8317420 Implement JEP 493: Linking Run-Time Images without JMODs
- Closed
- relates to
-
JDK-8345185 Update jpackage to not include service bindings by default
- Resolved
-
JDK-8345259 Disallow ALL-MODULE-PATH without explicit --module-path
- Resolved
-
JDK-8345573 Module dependencies not resolved from run-time image when --limit-module is being used
- Resolved
-
JDK-8344036 Tests tools/jlink/runtimeImage fail on AIX after JDK-8311302
- Resolved
-
JDK-8347124 Clean tests with --enable-linkable-runtime
- Resolved
-
JDK-8345184 Remove restriction of disallowing patched runtime when linking from the run-time image
- Open
-
JDK-8333799 JEP 493: Linking Run-Time Images without JMODs
- Closed
- links to
-
Commit(master) openjdk/jdk/2ec35808
-
Review(master) openjdk/jdk/14787