Skip to content

xbmlz/swing-flatlaf-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swing-flatlaf-template

Maven Basic Package

English | 简体中文

Swing + FlatLaf + jpackage + Maven template project for generating native desktop applications.

Features

  1. Build nice, small cross-platform Swing desktop apps with native installers
    • Apx 30-40mb .dmg, .msi and .deb installers - check out the example builds in releases.
    • Note that the macOS builds are not signed, and therefore macOS will report as damaged/unopenable. There are a few ways to deal with this, depending on your situation.
  2. Just use Maven - no shell scripts required.
    • Use standard Maven dependency system to manage dependencies
  3. Generate macOS (.dmg), Windows (.msi) and Unix (e.g. deb/rpm) installers/packages automatically with GitHub Actions.

Installation

  1. Install OpenJDK Java 17 or Oracle Java 17.
    • Verify by opening a fresh Terminal/Command Prompt and typing java --version.
  2. Install Apache Maven 3.6.3 or later and make sure it's on your path.
    • Verify this by opening a fresh Terminal/Command Prompt and typing mvn --version.
  3. macOS: verify XCode is installed and needed agreements accepted.
    • Launch XCode and accept the license, or verify in Terminal with the command sudo xcodebuild -license.
  4. Windows: install Wix 3 binaries.
    • Installing Wix via the installer should be sufficient for jpackage to find it.
  5. Clone/download this project.
  6. Final step: run mvn clean install from the root of the project to generate the target\TestApp.dmg or target\TestApp.msi (installer).
    • Note that the actual generated installer will include a version number in the file name.

Because these builds use stripped down JVM images, the generated installers are in the 30-40mb range.

On macOS you should add signing to avoid error messages related to the security system(s).

Build

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

Thanks

About

a small cross-platform Swing desktop apps template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published