Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX comes with JDK 8?

Tags:

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.

like image 397
Stardust Avatar asked Mar 13 '16 18:03

Stardust


People also ask

Is JavaFX included in Java JDK?

Availability. The JavaFX APIs are available as a fully integrated feature of the Java SE Runtime Environment (JRE) and the Java Development Kit (JDK ).

Does OpenJDK 8 include JavaFX?

JavaFX (OpenJFX) In 2018, Oracle decided to decouple JavaFX from the JDK. JavaFX lives on as OpenJFX, an OpenJDK subproject. As JavaFX is no longer part of OpenJDK, AdoptOpenJDK does not bundle it with its binaries.

Which JDK version has JavaFX?

For JDK 11 and later releases, Oracle has open sourced JavaFX.

Why is JavaFX not included in JDK?

JavaFX was removed from JDK since JDK 11. Since JDK 9, java is modular. JavaFX was split into modules. Hence there is no longer a single jfxrt.


1 Answers

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

like image 92
Antonio Raposo Avatar answered Sep 28 '22 05:09

Antonio Raposo