JavaFX comes with JDK 8?

Stardust picture Stardust · Mar 13, 2016 · Viewed 44.6k times · Source

I have multiple questions regarding JavaFX.

Does JavaFX come with JDK 8? Does JavaFX also require its own runtime environment?

I looked in my computer (I have JDK and JRE installed) but could not find the JavaFX. Does this mean that JavaFX has its own seperate runtime environment and development kit? If so, where can I find the download links?

If somehow it is already downloaded on my computer, how does JavaFX work? Is it similar to Swing or completely different?


Edit Jan 2020 for those who stumble upon this question: With JDK 11, JavaFX is standalone; see jewelsea's answer below. Antonio Raposo's answer applies for JDK 8, but note that it is outdated.

Answer

Antonio Raposo picture Antonio Raposo · Mar 13, 2016

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