Skip to content

Setup Guide

Please make sure your application is a working Gradle project. There shouldn’t be any compilation errors, the app should build and run.

The minimal setup doesn’t need any additional configuration. The essentials are inferred from the Java and Application plugin.

In build.gradle.kts or build.gradle apply the plugin using the plugins DSL. A minimal build script should contain these critical parts (adjusted according to your app):

build.gradle.kts
plugins {
application
id("de.infolektuell.jpackage") version "x.y.z"
}
application {
applicationName = "SampleApp"
mainClass = "org.example.App"
}

To turn your app into a self-contained executable, run this task:

Creating a self-contained executable
gradlew.bat appImage

After running successfully, the results can be found in the build directory:

  • Directoryapp The project directory
    • Directorybuild The build directory
      • Directoryjpackage
        • Directoryimage/ Contains the self-contained executable
    • build.gradle.kts
  • settings.gradle.kts

The build/jpackage/image directory contains a directory named by the application name. This directory contains the executable and required files, it can be copied anywhere and opened. Its structure depends on the build OS. On macOS, the folder structure follows the mac-specific application format,, its name has an .app suffix. It is immediately recognized as an application and can be opened like usual macOS apps.

Now you should have a minimal working setup. The rest of this documentation describes how app customization can be achieved with this plugin.