A minimal JavaFX 21 application built with Maven.
- Java 21 (JDK). Check with
java -version. - Maven 3.8+ (
mvn -v).
mvn clean javafx:runmvn clean packageThe produced JAR in target/ will be modular but still requires JavaFX runtime modules on the module path when running manually.
The os-maven-plugin automatically sets the correct JavaFX classifier for your platform (e.g. mac-aarch64). If you change Java versions, update the maven.compiler.release property.