/badass-jlink-example-javafx-multiproject

A JavaFX multi-project build that shows how to use the Badass JLink Plugin

Primary LanguageJavaApache License 2.0Apache-2.0

PRs Welcome License Build Status

Badass JLink Plugin Example: JavaFX multi-project

A JavaFX "Hello world" application that shows how to use the Badass JLink Plugin.

It is structured as a Gradle multi-project containing the following subprojects:

  • greeter-api - the greeting service API
  • greeter-impl - an implementation of the greeting service API
  • gui - a JavaFX application that uses the greeting service

Usage

Running with gradle:

./gradlew run

A window containing the text Hello, OpenJFX! should appear on the screen.

Creating and executing a custom runtime image:

./gradlew jlink
cd gui/build/image/bin
./helloFX

A window containing the text Hello, OpenJFX! should appear on the screen.

Creating an installable package:

./gradlew jpackage

The above command will generate the platform-specific installers in the gui/build/jpackage directory.

💡 You can check the artifacts produced by the GitHub actions used to build this project and download an application package for your platform (such as from here).