Jlink

A custom Java Runtime created with Jlink. Distributions of this type conform to the following file structure:

.
├── LICENSE
├── README
├── bin
│   ├── app
│   ├── app.bat
│   ├── java
│   └── keytool
└── conf
│    └── /* Java runtime */
└── legal
│    └── /* Java runtime */
└── lib
│    └── /* Java runtime */
└── release

Where:

  • the bin folder contains executable launcher scripts.

  • the lib folder contains all required JARs.

Jlink distributions do not require a suitable Java runtime to be installed on the consumer side as they already bundle a Java runtime, as a consequence you must specify a value for their platform. They are usually packaged as a Zip file. The archive must contain a root entry, typically following the name of the archive, thus if the archive is named app-1.2.3.zip the root entry should be app-1.2.3.

Creating a Distribution

We recommend using the following plugins to create suitable Java binary distributions:

Maven
Gradle
  • badass-runtime-plugin plugin: use it for non-modular applications. Generates distribution files that follow the expected structure. Also, packages the distribution as a Zip.

  • badass-jlink-plugin plugin: use it for modular applications. Generates distribution files that follow the expected structure. Also, packages the distribution as a Zip.

Alternatively, you may also configure a Jlink assembler.