8000 GitHub - h-takeyeah/minimum-javafx: Sample project of JavaFX
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

h-takeyeah/minimum-javafx

Repository files navigation

Minimum JavaFX

Sample project of JavaFX using Gradle with the least files.

Thanks to test-project of javafx-gradle-plugin and HelloFX by openjfx team!

This project used them:

name version
JDK 21.0.5 (Eclipse Adoptium 21.0.5+11-LTS)
JavaFX 17
Gradle 8.10 (built 2024-08-14 11:07:45 UTC)

Development environment: Windows10, IntelliJ IDEA 2024.3.

Details

Essential elements of JavaFX project using Gradle:

  • build.gradle.kts
    • 'application' plugin make it ease launching Main class
      • mainClass refers the name of a class which inherits javafx.application.Application
    • 'javafx' plugin provides configuration options to use JavaFX(e.g. if there is no JavaFX library, downloads it automatically)
    • (Optional) 'java' plugin specifies Java version for reproducibility
  • Main.java
    • Make sure that this class extends javafx.application.Application and overrides start() method
    • Do not click 'Run Main.main()' button or fails
      • launch via one of tasks of gradle named application:run

References

About

Sample project of JavaFX

Resources

License

Stars

Watchers

Forks

Languages

0