JavaFX 12 samples to run from NetBeans with different options and build tools
Version NetBeans 11.1
Download an appropriate JDK 12 for your operating system. Make sure JAVA_HOME
is properly set to the Java 12 installation directory.
The samples assume NetBeans 11 runs on JDK 12 (this can be set editing the etc/netbeans.conf
file
and setting netbeans_jdkhome="/path/to/jdk12"
).
Download JavaFX jmods for your operating system and unzip to a desired location.
For the first time only:
-
Download JavaFX SDK for your operating system and unzip to a desired location.
-
Open NetBeans and create a global Library under
NetBeans -> Tools -> Libraries -> New Library
. Name itJavaFX12
and include the jars under the lib folder from JavaFX 12 (but not thesrc.zip
file). -
Create a global Library under
NetBeans -> Tools -> Libraries -> New Library
. Name itJavaFXMODS12
and include the folder JavaFX jmods 12.
Clone the sample, open it with NetBeans, and make sure the paths for Java 12 and JavaFX 12 match those on your machine.
Clean and build with regular button to create a custom JRE. Run with regular button.
To run the custom JRE on Mac:
dist/jlink/HelloFX/bin/java -m hellofx/org.openjfx.MainApp
To run the custom JRE on Windows:
dist\jlink\HelloFX\bin\java -m hellofx/org.openjfx.MainApp