= Jlink

Distributions of this type conform to the following file structure:

[source]
----
.
├── 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.

== Creating a Distribution

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

.Maven

 * link:http://maven.apache.org/plugins/maven-jlink-plugin/[maven-jlink-plugin]: creates a *modular* Java Runtime image.

.Gradle

 * link:https://badass-runtime-plugin.beryx.org/releases/latest/[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.
 * link:https://badass-jlink-plugin.beryx.org/releases/latest/[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 xref:configuration:assemble/jlink.adoc[] assembler.

== Packager Support

[%header, cols="<,^"]
|===
| Packager                                       | Supported
| xref:configuration:packagers/chocolatey.adoc[] | {icon_req_y}
| xref:configuration:packagers/docker.adoc[]     | {icon_req_y}
| xref:configuration:packagers/homebrew.adoc[]   | {icon_req_y}
| xref:configuration:packagers/jbang.adoc[]      | {icon_req_n}
| xref:configuration:packagers/scoop.adoc[]      | {icon_req_y}
| xref:configuration:packagers/snap.adoc[]       | {icon_req_y}
|===



