carta
jlink-openjdk17(1)

jlink-openjdk171

Assemble and optimize a set of modules and their dependencies into a custom runtime image

Usage

jlink [options] --module-path modulepath --add-modules module [, module ...]

Overview

The jlink tool links a set of modules, along with their transitive dependences, to create a custom runtime image.

Note:

Developers are responsible for updating their custom runtime images.

Options

--add-modules mod [, mod...]

Adds the named modules, mod, to the default set of root modules. The default set of root modules is empty.

--bind-services

Link service provider modules and their dependencies.

-c ={0|1|2} or --compress={0|1|2}

Enable compression of resources:

•

0: No compression

•

1: Constant string sharing

•

2: ZIP

--disable-plugin pluginname

Disables the specified plug-in. See jlink Plug-ins for the list of supported plug-ins.

--endian {little|big}

Specifies the byte order of the generated image. The default value is the format of your system's architecture.

-h or --help

Prints the help message.

--ignore-signing-information

Suppresses a fatal error when signed modular JARs are linked in the runtime image. The signature-related files of the signed modular JARs aren't copied to the runtime image.

--launcher command=module or --launcher command=module/main

Specifies the launcher command name for the module or the command name for the module and main class (the module and the main class names are separated by a slash (/)).

--limit-modules mod [, mod...]

Limits the universe of observable modules to those in the transitive closure of the named modules, mod, plus the main module, if any, plus any further modules specified in the --add-modules option.

--list-plugins

Lists available plug-ins, which you can access through command-line options; see jlink Plug-ins.

-p or --module-path modulepath

Specifies the module path.

If this option is not specified, then the default module path is $JAVA_HOME/jmods. This directory contains the java.base module and the other standard and JDK modules. If this option is specified but the java.base module cannot be resolved from it, then the jlink command appends $JAVA_HOME/jmods to the module path.

--no-header-files

Excludes header files.

--no-man-pages

Excludes man pages.

--output path

Specifies the location of the generated runtime image.

--save-opts filename

Saves jlink options in the specified file.

--suggest-providers [name, ...]

Suggest providers that implement the given service types from the module path.

--version

Prints version information.

@filename

Reads options from the specified file.

An options file is a text file that contains the options and values that you would typically enter in a command prompt. Options may appear on one line or on several lines. You may not specify environment variables for path names. You may comment out lines by prefixing a hash symbol (#) to the beginning of the line.

The following is an example of an options file for the jlink command:

#Wed Dec 07 00:40:19 EST 2016
--module-path mlib
--add-modules com.greetings
--output greetingsapp

From jdk17-openjdk 17.0.21.0.3.u1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.