Content deleted Content added
(482 intermediate revisions by more than 100 users not shown) | |||
Line 1:
{{short description|Java software platform for GUI}}
{{Infobox
| name
| logo
| developer = [[Oracle Corporation]]
| released = {{Start date and age|2008|12|04}}
| latest release version = 21.0.2
| latest release date = {{Start date and age|2024|01|16}}<ref>{{Cite web|url=https://gluonhq.com/products/javafx/|title=Products » JavaFX|access-date=2023-06-20}}</ref>
| latest preview version =
| latest preview date
| operating system
| platform
| language
| genre
| license = [[GNU General Public License|GPL]]+[[GPL linking exception#The Classpath exception|classpath exception]]<ref name="openJFX">{{cite web | url=https://openjdk.java.net/projects/openjfx/ | title=OpenJFX Project | publisher=[[Oracle Corporation]] | access-date=2011-12-07 | archive-date=2011-12-05 | archive-url=https://web.archive.org/web/20111205070900/http://openjdk.java.net/projects/openjfx/ | url-status=live }}</ref>
| website = {{ubl|{{URL|wiki.openjdk.org/display/OpenJFX|wiki.openjdk.org}}|{{URL|openjfx.io}}}}
}}
{{Java platforms}}
'''JavaFX''' is a [[Computing platform|software platform]] for creating and delivering [[Application software|desktop applications]], as well as [[rich web applications]] that can run across a wide variety of devices. JavaFX has support for [[desktop computer]]s and [[web browser]]s{{Citation needed|date=June 2023}} on [[Microsoft Windows]], [[Linux]] (including [[Raspberry Pi]]), and [[macOS]], as well as mobile devices running [[iOS]] and [[Android (operating system)|Android]], through Gluon Mobile.
With the release of JDK 11 in 2018, [[Oracle Corporation|Oracle]] made JavaFX part of the [[OpenJDK]] under the ''OpenJFX'' project,<ref>{{cite web|url=https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html|title=JavaFX Developer Home|website=www.oracle.com|access-date=2019-06-14|archive-date=2019-07-12|archive-url=https://web.archive.org/web/20190712135800/https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html|url-status=live}}</ref> in order to increase the pace of its development.<ref>{{cite web|url=https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates|title=The Future of JavaFX and Other Java Client Roadmap Updates|last=Smith|first=Donald|date=March 7, 2018|access-date=June 14, 2019|archive-date=November 17, 2018|archive-url=https://web.archive.org/web/20181117154003/https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates|url-status=live}}</ref>
[[Open-source software|Open-source]] JavaFXPorts works for iOS (iPhone and iPad) and Android.<ref>{{cite news|url=https://gluonhq.com/products/mobile/javafxports/|title=JavaFXPorts - Gluon|work=Gluon|access-date=2018-05-01|language=en-US|archive-date=2018-05-02|archive-url=https://web.archive.org/web/20180502065830/https://gluonhq.com/products/mobile/javafxports/|url-status=live}}</ref> The related commercial software created under the name "Gluon" supports the same mobile platforms with additional features plus desktop.<ref name="gluonhq.com">{{cite web | url=https://gluonhq.com/ | title=Rapid Enterprise Mobile Apps: Build, Connect, Manage with Gluon | date=2017-12-16 | access-date=2017-12-16 | archive-date=2017-12-15 | archive-url=https://web.archive.org/web/20171215123649/http://gluonhq.com/ | url-status=live }}</ref> This allows a single source code base to create applications for the desktop, iOS, and Android devices.
== Features ==
{{Outdated|part=Features|date=July 2023|reason=}}
JavaFX 1.1 was based on the concept of a "common profile" that is intended to span across all devices supported by JavaFX. This approach makes it possible for developers to use a common programming model while building an application targeted for both desktop and mobile devices and to share much of the code, graphics assets and content between desktop and mobile versions. To address the need for tuning applications on a specific class of devices, the JavaFX 1.1 platform includes [[application programming interface|APIs]] that are desktop or mobile-specific. For example, the JavaFX Desktop profile includes [[Swing (Java)|Swing]] and advanced visual effects. JavaFX places all its symbols in the namespace <code>javafx</code>.
For the end user, the "Drag-to-Install" feature enables them to drag a JavaFX widget - an application residing in a website - and drop it onto their desktop. The application will not lose its state or context even after the browser is closed. An application can also be re-launched by clicking on a shortcut that gets created automatically on the user's desktop.
This behavior is enabled out-of-the-box by the Java applet mechanism since the Java 6u10 update, and is leveraged by JavaFX from the underlying Java layer.
Sun touts "Drag-to-Install" as opening up of a new distribution model and allowing developers to "break away from the browser".
JavaFX 1.x included a set of plug-ins for Adobe Photoshop and Illustrator that enable advanced graphics to be integrated directly into JavaFX applications. The plug-ins generate JavaFX Script code that preserves the layers and structure of the graphics. Developers can then add animation or effects to the static graphics imported. There is also an SVG graphics converter tool (also known as Media Factory) that allows for importing graphics and previewing assets after the conversion to JavaFX format.<ref>{{Cite web |title=Installing JavaFX Production Suite |url=http://java.sun.com/javafx/1/reference/production-suite-install/index.html |archive-url=https://web.archive.org/web/20090817205413/http://java.sun.com/javafx/1/reference/production-suite-install/index.html |archive-date=2009-08-17 |website=Sun Developer Network}}</ref>
Before version 2.0 of JavaFX, developers used a statically typed, declarative language called [[JavaFX Script]] to build JavaFX applications. Because JavaFX Script was compiled to [[Java bytecode]], programmers could also use [[Java Runtime Environment|Java]] code instead. JavaFX applications before 2.0 could run on any desktop that could run [[Java SE]], just like it is with the current versions.<ref>{{Cite web|title=JavaFX Overview (Release 8)|url=https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm|access-date=2021-12-26|website=docs.oracle.com|year=2014|archive-date=2021-10-21|archive-url=https://web.archive.org/web/20211021042605/https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm|url-status=live}}</ref>
JavaFX 2.0 and later is implemented as a Java library, and applications using JavaFX are written in normal Java code. The scripting language was scrapped by Oracle, however the development of it continued for a few years in the Visage project, finally ending in 2013.<ref>{{cite web |url=https://code.google.com/p/visage/ |title=Google Code Archive - Long-term storage for Google Code Project Hosting |website=Code.google.com |access-date=2016-08-01 |archive-date=2016-04-01 |archive-url=https://web.archive.org/web/20160401114024/https://code.google.com/p/visage/ |url-status=live }}</ref><ref>{{Cite web |title=Visage Language |url=https://github.com/visage-lang |access-date=2023-07-06 |website=GitHub |language=en |archive-date=2023-07-07 |archive-url=https://web.archive.org/web/20230707162129/https://github.com/visage-lang |url-status=live }}</ref>
Sun Microsystems licensed a custom [[typeface]] called Amble for use on JavaFX-powered devices. The font family was designed by [[mobile computing|mobile]] [[user interface]] design specialist [[Punchcut]] and is available as part of the JavaFX SDK 1.3 Release.
=== WebView ===
[[WebView]], the embedded [[web browser]] component, uses the [[WebKit]] [[browser engine]]. It supports the usual HTML5 features such as canvas, media, meter, progress, details and summary tags as well as MathML, SVG, JavaScript and CSS. [[WebAssembly]] support is not enabled.
=== JavaFX Mobile ===
{{Outdated|part=JavaFX Mobile|date=June 2023|reason=Many things have changed since then}}
JavaFX Mobile was the implementation of the JavaFX platform for [[rich web applications]] aimed at [[mobile device]]s. JavaFX Mobile 1.x applications can be developed in the same language, [[JavaFX Script]], as JavaFX 1.x applications for browser or desktop, and using the same tools: JavaFX SDK and the JavaFX Production Suite. This concept makes it possible to share code-base and graphics assets for desktop and mobile applications. Through integration with [[Java ME]], the JavaFX applications have access to capabilities of the underlying handset, such as the [[filesystem]], camera, [[GPS]], [[bluetooth]] or [[accelerometer]].
An independent application platform built on Java, JavaFX Mobile is capable of running on multiple mobile operating systems, including [[Android (operating system)|Android]], [[Windows Mobile]], and proprietary [[real-time operating system]]s.
JavaFX Mobile was publicly available as part of the JavaFX 1.1 release announced by [[Sun Microsystems]] on February 12, 2009.
Sun planned to enable out-of-the-box support of JavaFX on the devices by working with handset manufacturers and mobile operators to preload the JavaFX Mobile runtime on the handsets. JavaFX Mobile running on an Android was demonstrated at [[JavaOne]] 2008 and selected partnerships (incl. [[LG Electronics]], [[Sony Ericsson]]) were announced at the JavaFX Mobile launch in February, 2009.
=== Example ===
<syntaxhighlight lang="java">
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class JavaFXExample extends Application {
@Override
public void start(Stage primaryStage) {
Button button = new Button("Click Me!");
button.setOnAction(e -> System.out.println("Hello from JavaFX!"));
StackPane root = new StackPane(button);
Scene scene = new Scene(root, 300, 200);
primaryStage.setTitle("JavaFX Example");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
</syntaxhighlight>
== Components ==
The JavaFX platform includes the following components:
* The JavaFX [[Software development kit|SDK]]: Including among other things graphics, media services, rich text libraries, and the web view.
* [[NetBeans]] IDE for JavaFX: NetBeans with drag-and-drop palette to add objects with transformations, effects and animations plus a set of samples and best practices. For Eclipse users there is a community-supported plugin hosted on e(fx)clipse.
* JavaFX Scene Builder: This was introduced for JavaFX 2.1 and later. A user interface (UI) is created by dragging and dropping controls from a palette. The layout is saved as an FXML file, which is a special XML format.
=== Modules ===
JavaFX is split into the following [[Java Platform Module System|modules]].<ref>{{Cite web|url=https://openjfx.io/javadoc/24/|title=Overview (JavaFX)|website=openjfx.io}}</ref>
{| class="wikitable"
! Name !! Description
|-
| {{code|javafx.base}}
| Defines core APIs for the JavaFX UI toolkit (such as APIs for bindings, properties, collections, and events).
|-
| {{code|javafx.controls}}
| Defines the APIs for UI controls, charts, skins in the JavaFX UI toolkit.
|-
| {{code|javafx.fxml}}
| Defines the FXML APIs in the JavaFX UI toolkit.
|-
| {{code|javafx.graphics}}
| Defines scenegraph, animation, geometry, and other related APIs for the JavaFX UI toolkit.
|-
| {{code|javafx.media}}
| Defines media playback and audio content APIs for the JavaFX UI toolkit.
|-
| {{code|javafx.swing}}
| Defines JavaFX/[[Swing (Java)|Swing]] interop support APIs for the JavaFX UI toolkit.
|-
| {{code|javafx.web}}
| Defines WebView APIs for the JavaFX UI toolkit.
|-
| {{code|jdk.jsobject}}
| Defines APIs for [[JavaScript]] objects.
|-
| {{code|jfx.incubator.input}}
| Incubates mechanism for customising JavaFX controls.
|-
| {{code|jfx.incubator.richtext}}
| Incubates RichTextArea control for JavaFX.
|}
== History ==
=== Releases after version bump ===
JavaFX is now part of the JRE/JDK for [[Java version history#Java SE 8|Java 8]] (released on March 18, 2014) and has the same numbering, i.e., JavaFX 8.<ref name="FAQs">{{cite web |title=JavaFX FAQ |url=https://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html |access-date=2019-09-24 |website=Oracle.com |archive-date=2018-10-29 |archive-url=https://web.archive.org/web/20181029152754/https://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html |url-status=live }}</ref>
JavaFX 8 adds several new features, including:<ref>{{cite web | url = https://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html | title = JavaFX Roadmap | publisher = [[Oracle Corporation]] | access-date = 2012-11-24 | url-status = dead | archive-url = https://web.archive.org/web/20121201211443/https://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html | archive-date = 2012-12-01 }}</ref>
[[File:JavaFX - 3D shapes with materials adjusted.png|thumb|Example of simple 3D scene using JavaFX]]
* Support for 3D graphics<ref>{{cite web | url=https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-October/003641.html | title=3D Features Planned for Version 8 | publisher=[[Oracle Corporation]] | first=Chien | last=Yang | access-date=2012-11-24 | archive-date=2013-12-07 | archive-url=https://web.archive.org/web/20131207005653/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-October/003641.html | url-status=live }}</ref><ref>{{cite web | url=https://wikis.oracle.com/display/OpenJDK/3D+Features | title=3D Features Planned for Version 8 | publisher=[[Oracle Corporation]] | access-date=2012-11-24 | archive-date=2013-05-02 | archive-url=https://web.archive.org/web/20130502130923/https://wikis.oracle.com/display/OpenJDK/3D+Features | url-status=live }}</ref>
* Sensor support
* MathML support, with JavaFX 8 Update 192
* Printing and rich text support
* Generic dialog templates to replace JOptionPane (as of JavaFX 8u40)<ref>{{cite web|url=http://download.java.net/jdk9/jfxdocs/javafx/scene/control/Dialog.html |title=Dialog (JavaFX 9) |access-date=2015-01-05 |url-status=dead |archive-url=https://web.archive.org/web/20150105113138/http://download.java.net/jdk9/jfxdocs/javafx/scene/control/Dialog.html |archive-date=2015-01-05 }}</ref>
JavaFX 9 features were centered on extracting some useful private APIs from the JavaFX code to make these APIs public:
* [[JDK Enhancement Proposal|JEP]] 253: Prepare JavaFX UI Controls and CSS APIs for Modularization<ref>{{cite web | url=https://openjdk.java.net/jeps/253 | title=JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization | first=Jonathan | last=Giles | publisher=[[Oracle Corporation]] | date=2015-01-14 | access-date=2016-01-17 | archive-date=2016-03-10 | archive-url=https://web.archive.org/web/20160310171154/http://openjdk.java.net/jeps/253 | url-status=live }}</ref>
Oracle announced their intention to stop bundling JavaFX in their build of [[JDK]] 11 and later.<ref>{{Cite web |url=https://gluonhq.com/gluon-and-javafx/ |title=Gluon and JavaFX |access-date=2018-10-29 |archive-date=2019-04-29 |archive-url=https://web.archive.org/web/20190429062213/https://gluonhq.com/gluon-and-javafx/ |url-status=live }}</ref> It is no longer bundled with the latest version.
JavaFX 11 was first shipped in September 2018.
* JavaFX 11.0.2 is the latest public release of JavaFX 11.<ref name="github.com">{{cite web|title=javafxports/openjdk-jfx|url=https://github.com/javafxports/openjdk-jfx|access-date=2020-07-20|website=GitHub|language=en|archive-date=2020-08-03|archive-url=https://web.archive.org/web/20200803191632/https://github.com/javafxports/openjdk-jfx|url-status=live}}</ref>
* JavaFX 11.0.16 is the latest release of JavaFX 11 for those with a long-term support contract.<ref>{{Cite web |title=JavaFX |url=https://gluonhq.com/products/javafx/ |access-date=2022-10-05 |website=Gluon |language=en-US |archive-date=2022-09-28 |archive-url=https://web.archive.org/web/20220928185221/https://gluonhq.com/products/javafx/ |url-status=live }}</ref>
* MathML support
* FX Robot API
JavaFX 12 was first shipped in March 2019.
* JavaFX 12.0.1.<ref name="github.com" />
* Support for mouse forward/back buttons
* New protected VirtualFlow methods for subclassing<ref>{{Cite web |title=OpenJFX 12 Release notes |url=https://gluonhq.com/products/javafx/openjfx-12-release-notes/ |access-date=2023-07-06 |website=Gluon |language=en-US |archive-date=2023-07-07 |archive-url=https://web.archive.org/web/20230707162330/https://gluonhq.com/products/javafx/openjfx-12-release-notes/ |url-status=live }}</ref>
JavaFX 13 shipped in September 2019.
* Support for e-paper displays
* Support for native media rendering, through WritableImages backed by NIO ByteBuffers<ref>{{Cite web |title=OpenJFX 13 Release notes |url=https://gluonhq.com/products/javafx/openjfx-13-release-notes/ |access-date=2023-07-06 |website=Gluon |language=en-US |archive-date=2023-07-07 |archive-url=https://web.archive.org/web/20230707161954/https://gluonhq.com/products/javafx/openjfx-13-release-notes/ |url-status=live }}</ref>
JavaFX 14 was released in March 2020.
* Tab size property for Text and TextFlow
* Support for HTTP/2 in WebView<ref>{{Cite web |title=OpenJFX 14 Release notes |url=https://gluonhq.com/products/javafx/openjfx-14-release-notes/ |access-date=2023-07-06 |website=Gluon |language=en-US |archive-date=2023-07-07 |archive-url=https://web.archive.org/web/20230707162612/https://gluonhq.com/products/javafx/openjfx-14-release-notes/ |url-status=live }}</ref>
JavaFX 15 was released in September 2020.
* Support for e-paper displays on i.MX6 devices<ref>{{Cite web |title=OpenJFX 15 Release notes |url=https://gluonhq.com/products/javafx/openjfx-15-release-notes/ |access-date=2023-07-06 |website=Gluon |language=en-US |archive-date=2023-07-07 |archive-url=https://web.archive.org/web/20230707162357/https://gluonhq.com/products/javafx/openjfx-15-release-notes/ |url-status=live }}</ref>
JavaFX 16 was released in March 2021.
JavaFX 17 was released in September 2021. Highlights:
* 3D SpotLight type
* Load images and stylesheets from inline data-URIs
* Print to files
* Query states of CAPS LOCK and NUM LOCK keys
* Support for multiple screens in the window toolkit for embedded platforms
JavaFX 18 was released in March 2022. Highlights:
* Support for the [[High Efficiency Video Coding|H.265/HEVC]] media codec in the video player
* 3D DirectionalLight type
* Transparent backgrounds in WebView
* Set the "managed" property of nodes from CSS
* Factory methods for Border and Background
JavaFX 19 was released in September 2022. Highlights:
* Support for the [[High Efficiency Video Coding|H.265/HEVC]] [[HTTP Live Streaming]] in the video player
* Fluent bindings with lambdas: map, flatMap and orElse
* :focus-visibile and :focus-within CSS pseudo-classes
JavaFX 20 was released in March 2023. Highlights:
* Constrained resize policies for TableView and TreeTableView
* Improved lifecycle of UI controls skins (Skin::install)
* A simplified and deterministic way to manage listeners (ObservableValue::when)<ref>{{Citation |title=JavaFX 20 and Beyond |url=https://www.youtube.com/watch?v=f8TOo8TL4-k |access-date=2023-06-20 |language=en |archive-date=2023-06-20 |archive-url=https://web.archive.org/web/20230620160047/https://www.youtube.com/watch?v=f8TOo8TL4-k |url-status=live }}</ref>
=== Early releases ===
JavaFX Script, the scripting component of JavaFX, began life as a project by Chris Oliver called F3.<ref>{{cite web |date=2012-01-06 |title=F3 ( Chris Oliver's Weblog) |url=https://blogs.oracle.com/chrisoliver/entry/f3 |url-status=bot: unknown |archive-url=https://web.archive.org/web/20120106124512/http://blogs.oracle.com/chrisoliver/entry/f3 |archive-date=2012-01-06 |access-date=2016-08-20}}</ref>
[[Sun Microsystems]] first announced JavaFX at the [[JavaOne]] Worldwide Java Developer conference in May 2007.
In May 2008 Sun Microsystems announced plans to deliver JavaFX for the browser and desktop by the third quarter of 2008, and JavaFX for mobile devices in the second quarter of 2009. Sun also announced a multi-year agreement with [[On2 Technologies]] to bring comprehensive video capabilities to the JavaFX product family using the company's [[TrueMotion]] [[Video codec]]. Since end of July 2008, developers could download a preview of the JavaFX SDK for Windows and Macintosh, as well as the JavaFX plugin for [[NetBeans|NetBeans 6.1]].
Major releases since JavaFX 1.1 have a release name based on a street or neighborhood in [[San Francisco]]. Update releases typically do not have a release name.<ref name="RepositoriesAndReleases">{{cite web |date=2013-06-29 |title=Repositories and Releases |url=https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases |access-date=2013-10-18 |archive-date=2013-10-19 |archive-url=https://web.archive.org/web/20131019133723/https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases |url-status=live }}</ref>
On December 4, 2008, Sun released JavaFX 1.0.2.
JavaFX for mobile development was finally made available as part of the JavaFX 1.1 release (named Franca<ref name="RepositoriesAndReleases" />) announced officially on February 12, 2009.
JavaFX 1.2 (named Marina<ref name="RepositoriesAndReleases" />) was released at [[JavaOne]] on June 2, 2009. This release introduced:<ref>{{cite web |last=Marinacci |first=Joshua |date=2009-06-09 |title=Top 5 Most Important Features in JavaFX 1.2 |url=http://weblogs.java.net/blog/joshy/archive/2009/06/top_5_most_impo.html |url-status=dead |archive-url=https://web.archive.org/web/20090613001526/http://weblogs.java.net/blog/joshy/archive/2009/06/top_5_most_impo.html |archive-date=2009-06-13 |access-date=2009-06-12}}</ref>
* Beta support for [[Linux]] and [[Solaris (operating system)|Solaris]]
* Built-in [[GUI widget|controls]] and [[Layout manager|layouts]]
* [[Skin (computing)|Skinnable]] [[Cascading Style Sheets|CSS]] controls
* Built-in [[chart]] widgets
* JavaFX [[Input/output|I/O]] management, masking differences between [[Desktop computer|desktop]] and [[mobile device]]s
* Speed improvements
* Windows Mobile Runtime with Sun Java Wireless Client
JavaFX 1.3 (named Soma<ref name="RepositoriesAndReleases" />) was released on April 22, 2010. This release introduced:<ref>{{cite web |date=2010-04-22 |title=JavaFX 1.3 Released, Improves User Experiences |url=http://blogs.sun.com/javafx/entry/javafx_1_3_released_delivers |url-status=dead |archive-url=https://web.archive.org/web/20110430161432/http://blogs.sun.com/javafx/entry/javafx_1_3_released_delivers |archive-date=2011-04-30 |access-date=2010-04-25}}</ref>
* Performance improvements
* Support of additional platforms
* Improved support for user interface controls
JavaFX 1.3.1 was released on August 21, 2010. This release introduced:
* Quick startup time of JavaFX application
* Custom progress bar for application startup
JavaFX 2.0 (named Presidio<ref name="RepositoriesAndReleases" />) was released on October 10, 2011. This release introduced:
* A new set of Java APIs opening JavaFX capabilities to all Java developers, without the need for them to learn a new scripting language. JavaFX Script support was dropped permanently.
* Support for high performance lazy binding, binding expressions, bound sequence expressions, and partial bind re-evaluation.
* Dropping support for [[JavaFX Mobile]].
* Oracle announcing its intent to open-source JavaFX.
* JavaFX runtime turning to be platform-specific, utilizing system capabilities, as video codec available on the system; instead of implementing only one cross-platform runtime as with JavaFX 1.x.
Various improvements have been made within the JavaFX libraries for multithreading. The Task APIs have been updated to support much more concise threading capabilities (i.e. the JavaTaskBase class is no longer necessary since all the APIs are in Java, and the requirement to have a callback interface and Java implementation class are no longer necessary). In addition, the scene graph has been designed to allow scenes to be constructed on background threads and then attached to "live" scenes in a [[Thread safety|threadsafe]] manner.
On May 26, 2011, Oracle released the JavaFX 2.0 Beta. The beta release was only made available for 32 and 64 bit versions of Microsoft Windows XP, Windows Vista and Windows 7. An Early Access version for [[macOS|Mac OS X]] was also available for members of the JavaFX Partner Program at the time, while Linux support was planned for a future release of JavaFX. JavaFX 2.0 was released with only Windows support. Mac OS X support was added with JavaFX 2.1. Linux support was added with JavaFX 2.2.
JavaFX 2.0 makes use of a new declarative XML language called [[FXML]].<ref name="zdnet.co.uk">{{cite web |last=Meyer |first=David |date=2011-10-06 |title=JavaFX 2.0 arrives and heads for open source |url=http://www.zdnet.co.uk/news/application-development/2011/10/06/javafx-20-arrives-and-heads-for-open-source-40094121/ |access-date=2011-10-09 |publisher=[[ZDNet]] |archive-date=2011-11-25 |archive-url=https://web.archive.org/web/20111125054349/http://www.zdnet.co.uk/news/application-development/2011/10/06/javafx-20-arrives-and-heads-for-open-source-40094121/ |url-status=live }}</ref><ref>{{cite web |last=Brown |first=Greg |date=2011-08-15 |title=Introducing FXML |url=http://fxexperience.com/wp-content/uploads/2011/08/Introducing-FXML.pdf |access-date=2011-10-09 |archive-date=2012-01-31 |archive-url=https://web.archive.org/web/20120131185850/http://fxexperience.com/wp-content/uploads/2011/08/Introducing-FXML.pdf |url-status=live }}</ref>
On April 27, 2012, Oracle released version 2.1 of JavaFX,<ref name="terrencebarr">{{cite web |date=2012-04-27 |title=JDK 7u4 and JavaFX 2.1 released, now also including Mac OS X | Across the Universe |url=http://terrencebarr.wordpress.com/2012/04/27/jdk-7u4-and-javafx-2-1-released-now-also-including-mac-os-x/ |access-date=2016-08-01 |website=Terrencebarr.wordpress.com |archive-date=2016-10-19 |archive-url=https://web.archive.org/web/20161019092831/https://terrencebarr.wordpress.com/2012/04/27/jdk-7u4-and-javafx-2-1-released-now-also-including-mac-os-x/ |url-status=live }}</ref> which includes the following main features:<ref>{{cite web |title=JavaFX 2.1 Release Notes |url=https://docs.oracle.com/javafx/2/release_notes_2-1/jfxpub-release_notes_2-1.htm |access-date=2012-05-05 |publisher=[[Oracle Corporation]] |archive-date=2012-05-08 |archive-url=https://web.archive.org/web/20120508000647/http://docs.oracle.com/javafx/2/release_notes_2-1/jfxpub-release_notes_2-1.htm |url-status=live }}</ref>
* First official version for [[macOS|OS X]] (desktop only)
* [[H.264/MPEG-4 AVC]] and [[Advanced Audio Coding]] support
* [[CoolType]] text
* UI enhancements including combo box controls, charts (stacked chart), and menu bars
* Webview component now allows JavaScript to make calls to Java methods
On August 14, 2012, Oracle released version 2.2 of JavaFX,<ref name="oracleblog22">{{cite web |title=What's new in JavaFX 2.2 (The JavaFX Blog) |url=https://blogs.oracle.com/javafx/entry/what_s_new_in_javafx |url-status=dead |archive-url=https://web.archive.org/web/20160821200710/https://blogs.oracle.com/javafx/entry/what_s_new_in_javafx |archive-date=2016-08-21 |access-date=2016-08-01 |website=Blogs.oracle.com}}</ref> which includes the following main features:<ref>{{cite web |title=JavaFX 2.2 Release Notes |url=https://docs.oracle.com/javafx/2/release_notes_2-2/jfxpub-release_notes_2-2.htm |access-date=2012-10-02 |publisher=[[Oracle Corporation]] |archive-date=2012-08-21 |archive-url=https://web.archive.org/web/20120821024727/http://docs.oracle.com/javafx/2/release_notes_2-2/jfxpub-release_notes_2-2.htm |url-status=live }}</ref>
* Linux support (including plugin and webstart)
* Canvas
* New controls: Color Picker, Pagination
* HTTP Live Streaming support
* Touch events and gestures
* Image manipulation API
* Native Packaging
JavaFX 2.2 adds new packaging option called Native Packaging, allowing packaging of an application as a "native bundle". This gives users a way to install and run an application without any external dependencies on a system JRE or FX SDK.
As of Oracle Java SE 7 update 6 and JavaFX 2.2, JavaFX is bundled to be installed with Oracle Java SE platform.<ref name="FAQs" />
=== Future work ===
Oracle also announced in November 2012 the open sourcing of Decora, a [[Domain-specific language|DSL Shader language]] for JavaFX allowing to generate [[Shader]]s for [[OpenGL]] and [[Microsoft Direct3D|Direct3D]].<ref>{{cite web | url=https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-November/004292.html | title=Open Sourcing: decora-compiler | first=Richard | last=Bair | publisher=[[Oracle Corporation]] | date=2012-11-06 | access-date=2012-11-24 | archive-date=2013-12-07 | archive-url=https://web.archive.org/web/20131207005655/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-November/004292.html | url-status=live }}</ref>
Oracle wrote in its Client Support Roadmap that JavaFX new fixes will continue to be supported on Java SE 8 through March 2025.<ref name="oracleSERoadmap">{{cite web |author=<!--Not stated--> |date=2020-05-13 |title=Oracle Java SE Support Roadmap |url=https://www.oracle.com/technetwork/java/java-se-support-roadmap.html |access-date=2020-05-31 |website=Oracle Technology Network |publisher=Oracle |archive-date=2019-12-31 |archive-url=https://web.archive.org/web/20191231195356/https://www.oracle.com/technetwork/java/java-se-support-roadmap.html |url-status=live }}</ref> Previously, Oracle announced that they are "working with interested third parties to make it easier to build and maintain JavaFX as a separately distributable open-source module." JavaFX will continue to be supported in the future by the company Gluon as a downloadable module in addition to the JDK.<ref>{{Cite web |url=https://gluonhq.com/products/javafx/ |title=JavaFX |access-date=2019-05-26 |archive-date=2019-05-24 |archive-url=https://web.archive.org/web/20190524215715/https://gluonhq.com/products/javafx/ |url-status=live }}</ref>
== Availability ==
As of March 2014 JavaFX is deployed on [[Microsoft Windows]], [[macOS|OS X]], and [[Linux]].<ref>{{cite web | url=https://www.oracle.com/technetwork/java/javafx/downloads/index.html | title=General Availability Download | publisher=[[Oracle Corporation]] | access-date=2013-01-05 | archive-date=2012-12-26 | archive-url=https://web.archive.org/web/20121226231541/http://www.oracle.com/technetwork/java/javafx/downloads/index.html | url-status=live }}</ref> Oracle has an internal port of JavaFX on [[iOS]] and [[Android (operating system)|Android]].<ref>{{cite web | url=https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004670.html | title=Porting JavaFX | first=Richard | last=Bair | date=2012-12-03 | website=Mail.openjfx.dev.java.net | access-date=2013-01-05 | archive-date=2014-06-20 | archive-url=https://web.archive.org/web/20140620071107/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004670.html | url-status=live }}</ref><ref>{{cite web | url=https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004787.html | title=Survey: JavaFX on tablets and mobile devices | first=Tomas | last=Brandalik | date=2012-12-07 | access-date=2013-01-05 | archive-date=2014-06-20 | archive-url=https://web.archive.org/web/20140620071002/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004787.html | url-status=live }}</ref> Support for ARM is available starting with JavaFX 8<ref name="docs.oracle.com">{{cite web |url=https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm |title=1 JavaFX Overview (Release 8) |website=Docs.oracle.com |access-date=2016-08-01 |archive-date=2016-06-23 |archive-url=https://web.archive.org/web/20160623122528/http://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm |url-status=live }}</ref> On February 11, 2013, Richard Bair, chief architect of the Client Java Platform at Oracle, announced that Oracle would open-source the iOS and Android implementations of its JavaFX platform in the next two months.<ref>{{cite web | url=http://fxexperience.com/2013/02/february-open-source-update/ | title=February Open Source Update | first=Richard | last=Bair | publisher=[[Oracle Corporation]] | date=2013-02-16 | access-date=2013-02-13 | archive-date=2013-02-14 | archive-url=https://web.archive.org/web/20130214051610/http://fxexperience.com/2013/02/february-open-source-update/ | url-status=live }}</ref><ref>{{cite web | url=http://www.infoq.com/news/2013/02/javafx-ios-android | title=Oracle Announces Open Source JavaFX for iOS and Android | publisher=Infoq.com | date=2013-02-13 | access-date=2013-02-16 | archive-date=2013-02-17 | archive-url=https://web.archive.org/web/20130217071221/http://www.infoq.com/news/2013/02/javafx-ios-android | url-status=live }}</ref>
Starting with version 8u33 of JDK for ARM, support for JavaFX Embedded has been removed.<ref>{{cite web | url=https://www.oracle.com/technetwork/java/javase/jdk-8u33-arm-relnotes-2406696.html | title=JDK for ARM 8u33 release notes | publisher=[[Oracle Corporation]] | date=2013-02-16 | access-date=2015-03-09 | archive-date=2015-03-14 | archive-url=https://web.archive.org/web/20150314172237/http://www.oracle.com/technetwork/java/javase/jdk-8u33-arm-relnotes-2406696.html | url-status=live }}</ref>
Support will continue for x86-based architectures.<ref>{{cite web | url=https://www.raspberrypi.org/forums/viewtopic.php?f=81&t=97367&p=678791#p678791 | title=Raspberry Pi's mailing list: Where's JavaFX in recent Java 8u33 for the ARM ? | first=Dalibor | last=Topic | date=2013-01-27 | access-date=2015-03-09 | archive-date=2015-03-09 | archive-url=https://web.archive.org/web/20150309111925/http://www.raspberrypi.org/forums/viewtopic.php?f=81&t=97367&p=678791#p678791 | url-status=live }}</ref>
A commercial port of JavaFX for Android and iOS has been created under the name "Gluon".<ref name="gluonhq.com"/>
== License ==
There are various licenses for the previous modules that used to compose the JavaFX runtime:
* The JavaFX compiler<ref name="jfxcompiler">{{ cite web | url=http://openjfx-compiler.dev.java.net/ | title=OpenJFX Compiler Project | website=Openjfx-compiler.dev.java.net | access-date=2008-06-07 }}{{Dead link|date=February 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> and an older version of the [[2D computer graphics|2D]] [[Scene graph]]<ref name="scenegraph">{{ cite web | url=http://scenegraph.dev.java.net/ | archive-url=https://archive.today/20120306021341/http://scenegraph.dev.java.net/ | url-status=dead | archive-date=2012-03-06 | title=Project Scene Graph home | website=Scenegraph.dev.java.net | access-date=2008-06-07 }}</ref> are released under a [[GPL v2]] license,
* The [[NetBeans]] plugin for JavaFX is dual licensed under [[GPL v2]] and [[Common Development and Distribution License|CDDL]].<ref name="javaFX">{{ cite web | url=http://openjfx.dev.java.net/downloads.html | title=JavaFX Downloads | website=Openjfx.dev.java.net | access-date=2008-06-07 }}{{Dead link|date=February 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
During development, [[Sun microsystems|Sun]] explained they will roll out their strategy for the JavaFX licensing model for JavaFX first release.<ref name="javaFXFAQ">{{cite web | url=http://java.sun.com/javafx/faqs.jsp#2 | title=Will JavaFX technology be released in open source? | access-date=2008-06-07 | archive-date=2008-06-12 | archive-url=https://web.archive.org/web/20080612174718/http://java.sun.com/javafx/faqs.jsp#2 | url-status=live }}</ref> After the release in 2008, [[Jeet Kaul]], Sun's [[Vice president]] for Client Software, explained that they will soon publish a specification for JavaFX and its associated [[file format]]s, and will continue to open-source the JavaFX runtime, and decouple this core from the proprietary parts licensed by external parties.<ref>{{ cite web|url=http://blogs.sun.com/meetjeet/entry/javafx_the_road_ahead |title=JavaFX — the road ahead |date=2008-12-16 |last=Kaul |first=Jeet |access-date=2009-01-03 |url-status=dead |archive-url=https://web.archive.org/web/20081217162601/http://blogs.sun.com/meetjeet/entry/javafx_the_road_ahead |archive-date=December 17, 2008 }}</ref>
At [[JavaOne]] 2011, [[Oracle Corporation]] announced that JavaFX 2.0 would become open-source.<ref name="zdnet.co.uk"/> Since December 2011, Oracle began to open-source the JavaFX code under the [[GNU General Public License|GPL]]+[[GPL linking exception|linking exception]].<ref name="openJFX"/><ref>{{cite web | url=https://forums.oracle.com/forums/thread.jspa?messageID=10017677 | archive-url=https://archive.today/20130131062814/https://forums.oracle.com/forums/thread.jspa?messageID=10017677 | url-status=dead | archive-date=January 31, 2013 | title=Call for patches | first=Richard | last=Bair | date=2011-12-02 | publisher=[[Oracle Corporation]] | access-date=2011-12-07 }}</ref>{{unreliable source?|date=May 2012}}
In December 2012, new portions of the JavaFX source code were open-sourced by Oracle:<ref>{{cite web | url=https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/005007.html | title=More of JavaFX open-sourced | first=Pavel | last=Safrata | date=2012-12-18 | publisher=[[Oracle Corporation]] | access-date=2013-01-05 | archive-date=2012-12-29 | archive-url=https://web.archive.org/web/20121229000929/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/005007.html | url-status=live }}</ref>
* the animations and timelines classes
* the event delivery mechanism and other various core classes
* the render tree interface, and the implementation of this interface
* the geometry and shapes implementation
* the Java part of the rendering engine used in the rendering pipeline
* the logging support
== See also ==
{{Portal|
* [[Curl (programming language)]]
* [[JavaFX Script]]
* [[
== References ==
{{reflist}}
== Bibliography ==
{{refbegin}}
* {{cite book | first1 = Johan | last1 = Vos | first2 = Weiqi | last2 = Gao | first3 = Stephen | last3 = Chin | first4 = Dean | last4 = Iverson | first5 = James L. | last5 = Weaver | date = July 27, 2014 | title = Pro JavaFX 8: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients | publisher = [[Apress]] | page = 616 | isbn = 978-1-4302-6574-0 | url = https://www.apress.com/9781430265740 | access-date = October 29, 2018 | archive-date = October 24, 2016 | archive-url = https://web.archive.org/web/20161024180350/http://www.apress.com/9781430265740 | url-status = live }}
* {{cite book | first1 = James L. | last1 = Weaver | first2 = Weiqi | last2 = Gao | first3 = Stephen | last3 = Chin | first4 = Dean | last4 = Iverson | first5 = Johan | last5 = Vos | date = March 6, 2012 | title = Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology | publisher = [[Apress]] | page = 640 | isbn = 978-1-4302-6872-7 | url = http://www.apress.com/9781430268727 | access-date = March 13, 2012 | archive-date = March 18, 2012 | archive-url = https://web.archive.org/web/20120318015817/http://www.apress.com/9781430268727 | url-status = live }}
* {{cite book | first1 = Hendrik | last1 = Ebbers | date = July 7, 2014 | title = Mastering JavaFX 8 Controls | publisher = [[McGraw-Hill Education]] | page = 336 | isbn = 978-0071833776 | url = http://www.guigarage.com/javafx-book/ | access-date = September 9, 2015 | archive-date = September 6, 2015 | archive-url = https://web.archive.org/web/20150906130357/http://www.guigarage.com/javafx-book/ | url-status = live }}
* {{cite book | first1 = Vladimir | last1 = Vivien | date = August 25, 2010 | title = JavaFX 1.2 Application Development Cookbook | publisher = [[Packt Publishing]] | page = 332 | isbn = 978-1-84719-894-5 | url = https://www.packtpub.com/javafx-1-2-application-development-cookbook/book | access-date = August 30, 2010 | archive-date = January 28, 2010 | archive-url = https://web.archive.org/web/20100128120316/http://www.packtpub.com/javafx-1-2-application-development-cookbook/book | url-status = live }}
* {{cite book | first1 = Lucas | last1 = Jordan | date = December 17, 2009 | title = JavaFX Special Effects: Taking Java RIA to the Extreme with Animation, Multimedia, and Game Elements | publisher = [[Apress]] | page = 300 | doi = 10.1007/978-1-4302-2624-6 | isbn = 978-1-4302-2623-9 | url = https://link.springer.com/book/10.1007/978-1-4302-2624-6 | access-date = September 1, 2022 | archive-date = September 1, 2022 | archive-url = https://web.archive.org/web/20220901175327/https://link.springer.com/book/10.1007/978-1-4302-2624-6 | url-status = live }}
* {{cite book | first1 = Simon | last1 = Morris | date = November 23, 2009 | title = JavaFX in Action | publisher = [[Manning Publications|Manning]] | page = 375 | isbn = 978-1-933988-99-3 | url = http://www.jfxia.com/ | access-date = July 18, 2012 | archive-date = January 12, 2012 | archive-url = https://web.archive.org/web/20120112072212/http://www.jfxia.com/ | url-status = live }}
* {{cite book | first1 = Kim | last1 = Topley | date = October 12, 2009 | title = JavaFX Developer's Guide | publisher = [[Addison-Wesley Professional]] | page = 640 | isbn = 978-0-321-60165-0 | url = http://www.informit.com/store/product.aspx?isbn=0321648978 | access-date = May 29, 2009 | archive-date = January 15, 2012 | archive-url = https://web.archive.org/web/20120115013937/http://www.informit.com/store/product.aspx?isbn=0321648978 | url-status = live }}
* {{cite book | first1 = James L. | last1 = Weaver | first2 = Weiqi | last2 = Gao | first3 = Stephen | last3 = Chin | first4 = Dean | last4 = Iverson | date = June 22, 2009 | title = Pro JavaFX Platform: Script, Desktop and Mobile RIA with Java Technology | publisher = [[Apress]] | page = 500 | isbn = 978-1-4302-1875-3 | url = https://link.springer.com/book/9781430218753 | access-date = September 1, 2022 | archive-date = September 1, 2022 | archive-url = https://web.archive.org/web/20220901182046/https://link.springer.com/book/9781430218753 | url-status = live }}
* {{cite book | first1 = Jim | last1 = Clarke | first2 = Jim | last2 = Connors | first3 = Eric | last3 = J. Bruno | date = June 15, 2009 | title = JavaFX: Developing Rich Internet Applications | publisher = [[Prentice Hall]] | page = 384 | isbn = 978-0-13-701287-9 | url = http://www.informit.com/store/product.aspx?isbn=0137013531 | access-date = May 29, 2009 | archive-date = January 15, 2012 | archive-url = https://web.archive.org/web/20120115013816/http://www.informit.com/store/product.aspx?isbn=0137013531 | url-status = live }}
* {{cite book | first1 = Gail | last1 = Anderson | first2 = Paul | last2 = Anderson | date = June 15, 2009 | title = Essential JavaFX | publisher = [[Prentice Hall]] | page = 360 | isbn = 978-0-13-704279-1 | url = http://www.informit.com/store/product.aspx?isbn=0137042795 | access-date = May 29, 2009 | archive-date = January 15, 2012 | archive-url = https://web.archive.org/web/20120115001945/http://www.informit.com/store/product.aspx?isbn=0137042795 | url-status = live }}
* {{cite book | first = James L. | last = Weaver | date = May 4, 2009 | title = JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications | publisher = [[Apress]] | page = 200 | isbn = 978-1-59059-945-7 | url = https://dl.acm.org/doi/10.5555/1349814 | access-date = September 1, 2022 | archive-date = September 1, 2022 | archive-url = https://web.archive.org/web/20220901182536/https://dl.acm.org/doi/10.5555/1349814 | url-status = live }}
{{refend}}
== External links ==
* {{official|https://openjfx.io/}}
* [
{{Java (Sun)}}
{{Sun Microsystems}}
{{Java desktop}}
{{Rich web applications}}
[[Category:Java (programming language) libraries]]
[[Category:
[[Category:Rich web application frameworks]]
[[Category:Sun Microsystems software]]
[[Category:
|