Backend Development 5 min read

Packaging a Spring Boot Application into an Executable Installer with exe4j and Inno Setup

This tutorial walks through converting a functional Spring Boot JAR into a Windows executable using exe4j, bundling a local JRE, and creating a user‑friendly installer with Inno Setup, providing step‑by‑step screenshots and configuration details for non‑technical end users.

Java Architect Essentials
Java Architect Essentials
Java Architect Essentials
Packaging a Spring Boot Application into an Executable Installer with exe4j and Inno Setup

The author describes a recent project that merged front‑end and back‑end into a Spring Boot application and needed to deliver it as an executable installer for users unfamiliar with computers.

Preparation

A bug‑free, launchable JAR file.

exe4j – a tool that converts JAR files to EXE.

Inno Setup – a tool that packages the EXE together with its dependencies into a single installer.

Creating the EXE with exe4j

The JAR is placed on the desktop, then exe4j is opened and the wizard is followed: select "Java to EXE", provide a name and output path, choose the launch mode, and enable both 32‑bit and 64‑bit compatibility. In the VM parameters field, add -Dfile.encoding=utf-8 . The wizard continues through JRE configuration, selecting the local JRE directory, and finally produces demo.exe on the desktop.

Packaging with Inno Setup

In Inno Setup, start a new project, fill in basic application information, and add the generated EXE file. The wizard steps are mostly accepted with defaults, including language selection and output path. When reaching the script stage, the user is advised not to compile immediately but to edit the script to include the local JRE:

Source: "YourLocalJREPath*"; DestDir: "{app}{#MyJreName}"; Flags: ignoreversion recursesubdirs createallsubdirs

After saving the script, compile it; the compilation progress is shown by a green progress bar. Once finished, a setup.exe appears on the desktop.

Running setup.exe installs the application, creates a shortcut, and launches the packaged Spring Boot program without requiring a separate JDK installation.

The article concludes with a call to share the guide and join the author's architecture community.

Spring Bootexe4jExecutable installerInno SetupJava packaging
Java Architect Essentials
Written by

Java Architect Essentials

Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.

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.