Building a JavaFX application using Gradle

后端 未结 5 1259
予麋鹿
予麋鹿 2020-12-29 19:38

I\'m trying to build a relatively simple JavaFX application using Gradle. However, I have no idea how to do it.

I\'m relatively new to Gradle, and for simple (non-

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 20:19

    Here is my example project with OpenJDK 12, JavaFX 12 and Gradle 5.4. It uses the JavaFX Gradle plugin.

    • Opens a JavaFX window with the title "Hello World!"
    • Able to build a working runnable distribution zip file (Windows to be tested)
    • Able to open and run in IntelliJ without additional configuration
    • Able to run from the command line

    I hope somebody finds the Github project useful. Feel free to clone it. It is licensed with the Unlicense.

提交回复
热议问题