Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Launch4j does not normally place a complete Java runtime inside the .exe. It creates a native Windows launcher. To ship an application that works without a separate Java installation, distribute a complete JRE or runtime image beside the executable and configure Launch4j to search that directory first.

A typical release looks like this:

MyApp/
├─ MyApp.exe
├─ lib/
│  ├─ dependency-one.jar
│  └─ dependency-two.jar
└─ jre/
   ├─ bin/
   │  └─ javaw.exe
   ├─ conf/
   └─ lib/

The Bundled JRE path setting does not download or copy Java. It tells the generated launcher where the runtime supplied by you is located.

What Launch4j actually bundles

There are three separate ideas:

  • Launcher wrapping: Launch4j generates MyApp.exe, which starts Java with your application settings.
  • Bundled runtime: Your release archive contains a JRE or modular runtime image.
  • Runtime embedded in the executable: The runtime is merged into the binary itself. This is not Launch4j’s normal operating model.

Launch4j 3.50 documents a configured path such as jre and searches configured paths before the Windows registry. A valid runtime must nevertheless exist at that path. See the Launch4j documentation.

Prerequisites and runtime choices

  • A working application with a known fully qualified main class.
  • A built JAR or deliberately configured classpath.
  • Launch4j 3.50, or the version you are using.
  • A Windows-compatible runtime matching your application’s Java version and architecture.
  • Any native libraries, JavaFX components, or external JAR dependencies your application needs.
  • A clean Windows test machine or virtual machine without Java installed.

Choose a runtime source

For a simple first deployment, obtain a vendor runtime such as Eclipse Temurin. Eclipse directs users to its Temurin project downloads and the Adoptium API. Do not hard-code an update number in a general build guide; Java security updates change frequently, and you must review the selected vendor’s current redistribution terms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall

For Java 9 and later, a “JRE” may instead be a custom runtime image created with jlink. A full vendor runtime is easier to assemble; a custom image can reduce included modules but requires more testing.

Prepare the release directory

The runtime directory must be beside the final executable, not merely beside your project file. Preserve the complete internal layout; copying only java.exe or javaw.exe is insufficient.

release/
├─ MyApp.exe
├─ MyApp.jar
├─ lib/
│  ├─ dependency-one.jar
│  └─ dependency-two.jar
└─ jre/
   ├─ bin/
   │  └─ javaw.exe
   ├─ conf/
   └─ lib/

The JAR is shown separately because the exact Launch4j wrapping mode and dependency arrangement determine whether it remains in the release. If your configuration expects external libraries, keep those libraries in the configured classpath.

Rank #2
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
  • 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
  • 4GB DDR4 System Memory; 128GB Solid State Drive
  • 11.6" HD (1366 x 768) Multi-Touch Display
  • Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
  • Windows 11 Pro

Configure Launch4j

You can use launch4j.exe without arguments for the GUI, but save the resulting XML in source control and build with launch4jc.exe config.xml for repeatable releases. Launch4j’s paths may be absolute or relative to the configuration file when building; the bundled runtime path is resolved relative to the executable when the application starts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Representative XML

<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
    <headerType>gui</headerType>
    <outfile>releaseMyApp.exe</outfile>
    <jar>buildMyApp.jar</jar>
    <errTitle>MyApp</errTitle>
    <chdir>.</chdir>
    <classPath>
        <mainClass>com.example.Main</mainClass>
    </classPath>
    <jre>
        <path>jre</path>
        <requires64Bit>true</requires64Bit>
        <minVersion>17</minVersion>
    </jre>
</launch4jConfig>

Change gui to console for a command-line program. The mainClass must match the actual entry point. The jar identifies the application JAR used by the wrapper; it does not by itself copy a runtime into the output directory.

The bundled path, version, and architecture settings

The central setting is:

<jre>
    <path>jre</path>
</jre>

The directory name is not mandatory, but the value must exactly match it. For a 64-bit-only application or native dependency, use <requires64Bit>true</requires64Bit>. This selects a 64-bit runtime; it cannot make a 32-bit native library compatible.

Rank #3
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

For Java 9 and later, use a version such as <minVersion>17</minVersion>. Java 8-style versions use forms such as 1.8.0 or 1.8.0_121. Launch4j documents the Java 9-plus format as xxx[.xxx[.xxx]]; an underscore update suffix is not valid in that format. Use maxVersion when you need an upper bound as well.

In the GUI, these values correspond to the Basic tab’s output and JAR fields, the classpath/main-class controls, and the JRE tab’s bundled path, version, and bitness controls. Labels can vary by release, so treat the saved XML as authoritative and avoid obsolete fields such as bundledJre64Bit, runtimeBits, or bundledJreAsFallback.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a reproducible release

One Windows command sequence is:

rmdir /S /Q release 2>NUL
mkdir release
mkdir releasejre
copy buildMyApp.jar releaseMyApp.jar
xcopy /E /I /Y C:runtimestemurin-17-jre releasejre
launch4jc.exe config.xml

Adjust the runtime source and JAR locations to your build. If the runtime archive extracts to an extra top-level directory, flatten the copy so that releasejrebinjavaw.exe exists directly. Ship a manifest or archive containing the executable, runtime, libraries, README, and applicable license notices. Record the exact Java feature line and runtime update used for each release.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Creating a custom runtime with jlink

A Java 9-or-newer application can use a modular runtime image instead of a vendor directory:

jlink ^
  --add-modules java.base,java.desktop,java.logging ^
  --strip-debug ^
  --no-man-pages ^
  --no-header-files ^
  --compress=2 ^
  --output releasejre

The module list is application-specific. JavaFX, JDBC drivers, TLS providers, reflection-heavy frameworks, service loading, and native libraries may require additional modules or files. A reliable process is to run first with a full JDK, identify missing modules, rebuild the image, and test it on a clean machine. Never assume the example list is universal.

Verify that the bundled runtime is really used

  1. Copy the complete release to a Windows VM or PC with no Java installed.
  2. Repeat on a machine with an incompatible Java version and, where relevant, only 32-bit Java installed.
  3. Run the executable from a path containing spaces, then move the complete release elsewhere and run it again.
  4. Log the runtime selected by the process:
System.getProperty("java.version");
System.getProperty("java.home");
System.getProperty("os.arch");

A successful launch on your development computer is not proof that the bundled runtime was selected: JAVA_HOME, PATH, registry entries, or an otherwise compatible system Java can mask a broken release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

Symptom Likely cause Fix
Java runtime not found Missing or incorrectly nested runtime; wrong relative path; executable moved alone Place the complete runtime at releasejre, beside the executable, and rebuild or copy the whole release.
Runs only on the developer PC System Java is masking the bundle Test on a clean VM and inspect java.home and java.version.
Version error Runtime is below minVersion or version syntax is wrong Use Java 8 syntax for Java 8 and a form such as 17 for Java 9-plus.
64-bit error Runtime or native dependency architecture mismatch Use matching binaries and set requires64Bit when required.
ClassNotFoundException or NoClassDefFoundError Application dependency is absent or not on the classpath Correct the Launch4j classpath and ship the required lib files.
FindException or module errors jlink image omitted a required module Add the module, rebuild the image, and retest.
JavaFX fails to start JavaFX modules or platform-native files are absent Include compatible JavaFX runtime components and their native libraries.

Working-directory and installation permissions

<chdir>.</chdir> tells Launch4j to change to the executable directory, avoiding assumptions about how a shortcut or file association sets the current directory. Do not store mutable user data beside an executable installed under protected locations such as Program Files; use an appropriate per-user data directory instead.

When jpackage is a better fit

Launch4j is a launcher wrapper. It does not by itself provide an installer, shortcuts, uninstall support, upgrades, registry integration, or signing. jpackage creates application images containing application files and a runtime image, and can produce Windows exe and msi packages. A basic image command is:

jpackage ^
  --type app-image ^
  --name MyApp ^
  --input input ^
  --main-jar MyApp.jar ^
  --main-class com.example.Main

Unless --runtime-image is supplied, jpackage creates a runtime through jlink. Windows packages must be built on Windows; Oracle documents no cross-platform build support. Existing Launch4j XML workflows may therefore be simpler to retain, while new projects needing native installation should evaluate jpackage.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$247.99
Bestseller No. 2
Dell Latitude 3190 11.6' HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core; 4GB DDR4 System Memory; 128GB Solid State Drive
$179.99
Bestseller No. 3
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$304.99

Release maintenance

  • Track the Java feature line and exact runtime update used.
  • Apply security updates, rebuild, and retest the runtime.
  • Review the selected vendor’s current license and redistribution terms.
  • Sign the executable and installer as a separate release step; bundling Java does not remove SmartScreen or antivirus warnings.
  • Keep the runtime, application, native libraries, and architecture aligned in every release.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.