APACHE-2.0 License
Spring Boot + jpackage + Maven template project for generating native desktop applications.
Generate macOS (.dmg), Windows (.msi) and Unix (e.g. deb/rpm) installers/packages automatically with GitHub Actions
In many ways this project provides a Java developer with tooling similar to Electron or Neutralino.js
This template uses a Maven plugin to generate a custom JVM and installer package for a Spring Boot application run as a desktop app. Conceptually this is similar to Electron
The basic requirements are just Java 16 and Maven. Java 15 will work, although it requires a bit of setup.
The project includes GitHub Actions which automatically generate macOS, Windows, and Linux installers.
The generated installers come in at around 30-40mb. The example source in the project includes demonstrations of several native desktop features - for example, drag-and-drop from the Finder/Explorer, as well as a few macOS Dock integration examples. Removing the code and the demonstration dependendencies gets a "Hello World" build size closer to 30mb than 40mb.
Here are few cool things in this template:
Once you get started, you might find these lists of tutorials, tools, libraries for JavaFX and general Java desktop integration helpful.
Once everything is installed (see below) it's really easy to use:
To generate an installer, just run...
mvn clean install
To do everything up until the actual installer generation (including generating the custom JVM)...
mvn clean package
java --version
.mvn --version
.sudo xcodebuild -license
.mvn clean install
from the root of the project to generate the target\TestApp.dmg
target\TestApp.msi
(installer).
Because these builds use stripped down JVM images, the generated installers are in the 30-40mb range.
This project is sponsored by ChangeNode.com - if you would like to add easy automatic updates, crash reporting, analytics, etc. to your Java/JavaFX desktop application, go check it out... and be sure to subscribe for more information about desktop Java development.
Problems? Make sure everything is installed and working right!
If you need consulting support, feel free to reach out to ChangeNode.com.
If you are using the template, browsing the Q&A is highly recommended.