JLink - The Java Linker [JEP-282]
The Java Linker, commonly referred to as JLink, is a tool that was created to create custom runtime images. This tool collects the appropriate modules along with their dependencies, then optimizes them to create the image. This represents a big change for Java, with the release of Java 9. Before the Java Linker tool, jlink
, was available, runtime image creation included initially copying the entire JRE. In a subsequent step, the unused components were removed. In Java 9, jlink
creates runtime images with only the needed modules. jlink
is used by the Java Packager to generate an embedded runtime image.
As illustrated in a previous section, JEP-282 resulted in link time as an optional phase between compile time and runtime. It is in this phase that the appropriate modules are assembled into an optimized runtime image.
JLink is a command-line linking tool that permits the creation of runtime images containing a smaller subset of the JDK modules. This results...