Note: This repository is a fork of openjfx/samples.
A comprehensive collection of JavaFX sample projects demonstrating how to build and run JavaFX applications using various build tools and IDEs.
This repository contains a set of HelloFX sample projects created with JavaFX. Each sample illustrates a minimal HelloWorld-style application that can be compiled and executed using different toolchains -- from the command line, with Maven or Gradle, or directly within popular IDEs such as IntelliJ IDEA, NetBeans, and Eclipse. Both modular and non-modular project configurations are provided.
- Command Line samples -- Build and run JavaFX apps without an IDE using CLI, Maven, or Gradle
- IDE samples -- Pre-configured projects for IntelliJ IDEA, NetBeans, and Eclipse
- Modular and Non-modular -- Examples for both Java module system (JPMS) and classpath-based setups
- Multiple build tools -- Support for plain Java compilation, Maven, and Gradle
- Java JDK 11+ (with JavaFX SDK or as a Maven/Gradle dependency)
- JavaFX SDK 13+ (for non-Maven/Gradle command line builds)
- Maven 3.6+ (for Maven-based samples)
- Gradle 5.0+ (for Gradle-based samples)
- An IDE of your choice (IntelliJ IDEA, NetBeans, or Eclipse) for IDE-specific samples
git clone https://github.com/danielcregg/samples.git
cd samplesEach sample directory contains its own README.md with specific build and run instructions. Navigate to the sample of your choice:
| Category | Modular | Non-Modular |
|---|---|---|
| CLI | CommandLine/Modular/CLI | CommandLine/Non-modular/CLI |
| Maven | CommandLine/Modular/Maven | CommandLine/Non-modular/Maven |
| Gradle | CommandLine/Modular/Gradle | CommandLine/Non-modular/Gradle |
| IntelliJ | IDE/IntelliJ/Modular | IDE/IntelliJ/Non-Modular |
| NetBeans | IDE/NetBeans/Modular | IDE/NetBeans/Non-Modular |
| Eclipse | IDE/Eclipse/Modular | IDE/Eclipse/Non-Modular |
For detailed documentation, visit the OpenJFX Getting Started Guide.
- Language: Java
- UI Framework: JavaFX 13+
- Build Tools: Maven, Gradle
- IDEs: IntelliJ IDEA, NetBeans, Eclipse
This project is licensed under the BSD 3-Clause License.