Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Labs

Guided: Packaging a Java SE App with jlink and jpackage

Go beyond JAR files and learn to package your Java SE applications into lightweight, self-contained executables and native installers. This Code Lab guides you through using jlink to create a custom Java runtime and jpackage to build platform-specific installers, dramatically simplifying deployment and reducing the application’s footprint.

Lab platform
Lab Info
Level
Intermediate
Last updated
Jan 15, 2026
Duration
45m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Introduction and Setup

    Welcome! In this Code Lab, you'll master the art of packaging modern Java applications. You'll take a simple modular command-line tool and turn it into a professional, native installer.

    The project is a Quote of the Day application, structured into two modules:

    • com.qotd.lib: A library module responsible for providing quotes.
    • com.qotd.app: The main application module that consumes the library and displays the quote.

    Your main task is to build a build.sh script step-by-step. This script will automate the entire pipeline: compiling, running, packaging into JARs, creating a custom runtime with jlink, and finally, generating a native installer with jpackage. info> This lab experience was developed by the Pluralsight team using Forge, an internally developed AI tool utilizing Gemini technology. All sections were verified by human experts for accuracy prior to publication. For issue reporting, please contact us.

  2. Challenge

    Implement and Compile the Modules

    First, you'll get the application code working. Implement the core logic for the two modules and write the initial portion of your build script to compile them.

    This step focuses on the fundamentals of the Java Platform Module System (JPMS) and using javac to compile modular code.

  3. Challenge

    Run and Package the Application

    Now that you can compile the modules, the next steps are to run the application from the compiled classes and then package those classes into standard modular JAR files. This confirms that our module dependencies are correctly defined and prepares the code for distribution.

  4. Challenge

    Create a Custom Runtime with jlink

    In this step, you’ll bundle a minimal Java runtime with your application so users do not need to install Java separately. The jlink tool analyzes your application to determine which parts of the JDK are required and then creates a small, optimized runtime image.

  5. Challenge

    Generate a Native Installer with jpackage

    In this step, you’ll create a platform-native installer for the application. The jpackage tool takes the application JAR files and the custom runtime image created with jlink, and bundles them into an installer such as a .deb file for Debian or Ubuntu, or an .msi file for Windows.

About the author

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight