Backend Development 5 min read

How to Package a Spring Boot Application into an Executable Installer Using exe4j and Inno Setup

This tutorial walks through converting a functional Spring Boot JAR into a Windows executable with exe4j, bundling a local JRE, and then creating a user‑friendly installer using Inno Setup, providing step‑by‑step screenshots and configuration details to avoid common pitfalls.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
How to Package a Spring Boot Application into an Executable Installer Using exe4j and Inno Setup

The article describes a complete workflow for turning a Spring Boot JAR that runs without bugs into a Windows executable (EXE) and then packaging it into an installer that can be run on computers without a JDK.

Preparation : you need a working JAR, the exe4j tool (download link and extraction code provided), and Inno Setup (download link and extraction code provided).

Creating the EXE with exe4j : open exe4j, select "Java to EXE", specify the JAR location and output path, choose the launch mode, and enable both 32‑bit and 64‑bit compatibility. In the VM parameters field add the line -Dfile.encoding=utf-8 . Continue configuring the JRE, selecting "Client VM", and finish the wizard to generate demo.exe on the desktop.

Bundling the JRE : the goal is to copy the local JRE directory into the EXE package so the program can run without a separate JDK installation.

Creating the Installer with Inno Setup : start a new script, fill in basic application information, and on the file selection page choose the generated demo.exe . Follow the wizard, keeping default options for language and output settings, and add a script line to copy the JRE files, e.g.: Source: "YourLocalJREPath\*"; DestDir: "{app}\{#MyJreName}"; Flags: ignoreversion recursesubdirs createallsubdirs . Compile the script to produce setup.exe .

After compilation, setup.exe can be distributed; installing it places a shortcut and the bundled application on the target machine, allowing users with no Java environment to run the Spring Boot program.

BackendJavaSpring BootInstallerExecutableexe4jInno Setup
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.