Skip to content

beryx-gist/badass-jlink-example

Repository files navigation

PRs Welcome License Build Status

Badass JLink Plugin Example

A small application that shows how to use the Badass JLink Plugin.

The plugin is configured in build.gradle as follows:

plugins {
    id 'org.beryx.jlink' version '2.23.6'
    ...
}

jlink {
    mergedModule {
        requires 'java.naming'
        requires 'java.xml'
    }
    launcher{
        name = 'hello'
        jvmArgs = ['-Dlogback.configurationFile=./logback.xml']
    }
}

Usage

Running with gradle:

./gradlew run

The following text should appear on your screen:

LOG: Hello, modular java!

Creating and executing a custom runtime image:

./gradlew jlink
cd build/image/bin
./hello

The following text should appear on your screen:

LOG: Hello, modular java!

About

Usage example of the Badass JLink Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages