How to Package a Spring Boot Application into an EXE Installer Using exe4j and Inno Setup
This guide walks through preparing a runnable Spring Boot JAR, converting it to an EXE with exe4j (including VM options and bundled JRE), and then creating a self‑contained installer using Inno Setup so the application can run on computers without a pre‑installed JDK.
Introduction: The author describes the need to convert a Spring Boot JAR into an executable file for non‑technical users.
Preparation: Ensure a runnable JAR, download exe4j (registration code provided), and Inno Setup for creating an installer.
Using exe4j: Open exe4j, select “Java to EXE”, set the JAR path, output name, choose launch mode, enable 32/64‑bit compatibility, add VM option -Dfile.encoding=utf-8 , configure JRE to bundle a local JRE, select Client VM, and finish the wizard to generate demo.exe.
Creating the installer with Inno Setup: Start a new script, fill application name and version, add the generated EXE and the bundled JRE directory, configure output path, language, and other defaults, then compile to produce setup.exe.
Result: The produced setup.exe installs the application together with the JRE, allowing it to run on machines without a pre‑installed JDK.
Architecture Digest
Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.