Skip to content

A template project for using JavaFX 16 with Java 16 and Gradle 7.

License

Notifications You must be signed in to change notification settings

lucasstarsz/javafx-template

Repository files navigation

JavaFX Template Project

License Badge

A JavaFX template project containing the following configurations:

  • Gradle build tool, version 7.0.2
  • Java 16
  • JavaFX 16 dependencies (configured to work with Windows, Linux, MacOS)
  • Empty JavaFX template program (module-info & main class configurable from build.gradle)
  • JUnit 5 Unit Testing (with pretty-print test results)
  • Badass JLink Plugin, version 2.24.0 with the following configurations:
    • JavaFX dependencies
    • Icon paths
    • App name/description
    • Don't show the console when running jlink executable script
    • Create core dump if jpackage executable crashes

How to Use

  1. Clone the repository.
$ git clone https://github.com/lucasstarsz/javafx-template
  1. Build the project.
$ cd javafx-template
$ ./gradlew build

If you're on Windows, run gradlew.bat instead.

  1. Read through build.gradle for configuration information.

If you need a tutorial on how to use JavaFX, check out Jenkov's JavaFX Tutorials. They cover nearly 70 specific JavaFX controls and concepts, and are what I used to learn JavaFX.

If you need a tutorial on how to use Gradle, check out Baeldung's Gradle Tutorials. They're what I used to learn the basics of Gradle.