O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

jlink

This tool is used to select modules and create a smaller runtime image with the selected modules. For example, we can create a runtime image by adding the com.packt modules created in our HelloWorldXml example:

$> jlink --module-path mods/:$JAVA_HOME/jmods/ --add-modules com.packt --output img

Looking at the contents of the img folder, we should find that it has the bin, conf, include, and lib directories. We will learn more about jlink under Chapter 3, Modular Programming.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required