jpackage - What Is It

This section describes what is 'jpackage' - a command line tool that allows you to create a binary distribution package of your Java application for a specific computer platform in a specific format.

What Is "jpackage"? - "jpackage" is a command line tool that allows you to create a binary distribution package of your Java application for a specific computer platform in a specific format.

Currently, "jpackage" supports these package formats for different platform: "app-image", "exe", "msi", "rpm", "deb", "pkg", and "dmg".

If you have %java_home%\bin directory included in "path" the environment variable, you can run "jpackage --help" to get the usage information:

herong> jpackage --help

WARNING: Using incubator modules: jdk.incubator.jpackage
Usage: jpackage <options>

Sample usages:
--------------
Generate an application package suitable for the host system:
    For a modular application:
        jpackage -n name -p modulePath -m moduleName/className
    For a non-modular application:
        jpackage -i inputDir -n name \
            --main-class className --main-jar myJar.jar
    From a pre-built application image:
        jpackage -n name --app-image appImageDir
Generate an application image:
    For a modular application:
        jpackage --type app-image -n name -p modulePath \
            -m moduleName/className
    For a non-modular application:
        jpackage --type app-image -i inputDir -n name \
            --main-class className --main-jar myJar.jar
    To provide your own options to jlink, run jlink separately:
        jlink --output appRuntimeImage -p modulePath -m moduleName \
            --no-header-files [<additional jlink options>...]
        jpackage --type app-image -n name \
            -m moduleName/className --runtime-image appRuntimeImage
Generate a Java runtime package:
    jpackage -n name --runtime-image <runtime-image>

...

For more information, see "jpackage" reference page at https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpackage.html.

Table of Contents

 About This Book

 Java Tools Terminology

 Java Tools Included in JDK

 javac - The Java Program Compiler

 java - The Java Program Launcher

 jar - The JAR File Tool

 jlink - The JRE Linker

 jmod - The JMOD File Tool

 jimage - The JIMAGE File Tool

jpackage - Binary Package Builder

jpackage - What Is It

 "jpackage -t dmg" - Package for macOS

 "jpackage -t pkg" - Package for macOS

 "jpackage -t msi" - Package for Windows

 javadoc - The Java Document Generator

 jdeps - The Java Class Dependency Analyzer

 jdeprscan - The Java Deprecated API Scanner

 jdb - The Java Debugger

 jcmd - The JVM Diagnostic Tool

 jconsole - Java Monitoring and Management Console

 jstat - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jhsdb - The Java HotSpot Debugger

 jvisualvm (Java VisualVM) - JVM Visual Tool

 jmc - Java Mission Control

 javap - The Java Class File Disassembler

 keytool - Public Key Certificate Tool

 jarsigner - JAR File Signer

 jshell - Java Language Shell

 jrunscript - Script Code Shell

 Miscellaneous Tools

 native2ascii - Native-to-ASCII Encoding Converter

 JAB (Java Access Bridge) for Windows

 Archived Tutorials

 References

 Full Version in PDF/EPUB