JavaFX comes with JDK 8?
JavaFX is bundled with JRE 8 and JDK 8. The JavaFX jar is jfxrt.jar
and resides in the ext
folder.
To deploy an application the only requisite is that the JRE 8 is properly installed.
There are similarities between JavaFX and Swing, but also differences. The best way to start is by reading the documentation available at the JDK site. Be careful to read JavaFX 8 pages and not JavaFX 2 pages as there are some differences and some old examples might not work.
You may also be interestes in one or other example I am posting in my blog A Cup of Java
Update Jan 2020
JDK 8 versions of JavaFX are now outdated.
Modern JavaFX versions (11+) are currently available from:
- https://openjfx.io/ - documentation
- https://gluonhq.com/products/javafx/ - hosted downloads
JavaFX libraries are usually not shipped standard with most OpenJDK or Oracle JDK versions. Instead JavaFX is available as a seperate set of libraries, modules and a SDK. Instructions on including JavaFX with your runtime distribution and developing with JavaFX are included at the openjfx.io link above.
Liberica JDK distributions by BellSoft currently ship with included JavaFX libraries and SDK tools. Or you can choose an OpenJDK version which does not include JavaFX from https://adoptopenjdk.net/ and add on a JavaFX distribution via following installation instructions at https://openjfx.io/ or as a maven or gradle dependency (also documented at the openjfx.io link).
JavaFX 8 tutorials hosted at Oracle are high quality and still relevant for use with later JavaFX versions.
Original Answer for JDK 8
JavaFX for Oracle Java 8 is not a separate installation. JavaFX is included in Oracle JDK 8 running on OS X, Linux x86 and Windows. The best place to learn more about this is the Oracle Client Technologies documentation for JavaFX.
Oracle used to distribute a binary version for Linux ARM as well, but I think that is only available by compiling the OpenJDK source now.
OpenJDK 8 binary installations, such as those which ship with Ubuntu, don't currently include JavaFX by default. For Ubuntu, it seems you can install a separate apt package for JavaFX. A user commented on another answer that the command for this is: sudo apt-get install openjfx
(though I haven't an installation of Ubuntu to try it on). For more information on the relationship of OpenJDK and JavaFX, read: JavaFX and OpenJDK.
One thing that may be confusing you is that a very early version of JavaFX (1.x) was distributed as a separate download and development kit and implemented a new language called JavaFX Script which was different from Java. However, that early version of JavaFX is now no longer supported and should not be used. As of JavaFX (2.x) the JavaFX system was completely rewritten to provide a straight Java API and no longer use JavaFX Script. As of Java 8, JavaFX was completely integrated into Oracle JDK and no longer distributed as a separate download by Oracle. Being a Java API for Java GUIs that is part of the Oracle JDK, JavaFX is similar (in that way) to Swing; so the Oracle JDK provides alternate and distinct toolkits in the form of Swing and JavaFX.