The app image
The next step is packaging the application into a self-contained executable. This includes:
- The previously generated runtime image
- App-specific customizations and assets like icons and resources
- a launcher that runs Java with the correct arguments
- Non-modular jar files that are runtime dependencies of the app and couldn’t be included in the linking step
The jpackage tool is responsible for this step. It assembles everything into a specific folder structure that tries to mimic how native apps are structured on the respective operating systems. This is called an app image, a tool-specific format. It has nothing to do with e.g. the Linux App Image format (which would be nice to have).
The plugin adds an appImage task that runs the jpackage tool and outputs the app image under build/jpackage/image.
It can directly be executed without having to install it somewhere on the system.
gradlew.bat appImage./gradlew appImageJpackage can build apps only for the OS it runs on.