A simple Java + JavaFX + Gradle Template to get you going with minimum effort. Instructions below.
- OpenJDK 15+ [with the PATH and JAVA_HOME env-vars set up]
- Gradle 6.8+ [with the PATH env-var set up]
- Optional: Eclipse JDT 2020.03+ [You can build, run and package with Gradle or a Gradle-Aware IDE]
-
Make sure you have the required OpenJDK and Gradle correctly installed.
-
Clone/Download this repository to your local drive.
-
Open a command promp inside the project folder.
-
Execute "gradle eclipse" to generate eclipse .project files.
-
Execute "gradle run" to directly start the demo application with gradle.
-
Execute "gradle jpackage" to build a standalone program inside "build/jpackage/".
Highly recommended: customize the generic package, module and binary names to your liking. You need to edit "gradle.build", the src folders, App.java and "module-info.java". Editing the package and module names is easier inside an IDE. The only thing that needs to be edited outside of the IDE is the gradle.build file.
Execute this in the project-directory to generate Elipse .project files if necessary:
gradle eclipse
Then simply import the project into your workspace as an existing project.
You can also edit the files using any other editor/IDE of your choice and build using Gradle.
Run the main-class App.java with Eclipse or use Gradle:
To use Gradle, run this in the project directory:
gradle run
Execute this in the project-directory:
gradle jpackage
The folder containing the packaged program will be placed in the /build/jpackage directory.
See the LICENSE file for license rights and limitations.