How can I find out at runtime which version of JavaFX I'm using?
JavaFX is now part of the JRE/JDK for Java 8 (released on March 18, 2014) and has the same numbering, i.e., JavaFX 8.
JavaFX is not included in the JDK since Java 9 (with the exception of the Azul JDK, IIRC). You need to include JavaFX on the class path yourself.
One of simple ways is to simply read the javafx.properties
file located in your $JAVA_HOME/jre/lib
directory.
I have Java 1.7 u9 installed at the moment. JavaFX bundled with it is v2.0.3 so the abovementioned file contains the following line:
javafx.runtime.version=2.0.3
com.sun.javafx.runtime.VersionInfo.getRuntimeVersion();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With