With the release of JDK 11 in 2018, Oracle made JavaFX part of the OpenJDK under the OpenJFX project,[3] in order to increase the pace of its development.[4]
Open-source JavaFXPorts works for iOS (iPhone and iPad) and Android.[5] The related commercial software created under the name "Gluon" supports the same mobile platforms with additional features plus desktop.[6] This allows a single source code base to create applications for the desktop, iOS, and Android devices.
Features
Parts of this article (those related to Features) need to be updated. Please help update this article to reflect recent events or newly available information.(July 2023)
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 APIs that are desktop or mobile-specific. For example, the JavaFX Desktop profile includes Swing and advanced visual effects.
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.[7]
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 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.[8]
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.[9][10]
Sun Microsystems licensed a custom typeface called Amble for use on JavaFX-powered devices. The font family was designed by mobileuser 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 WebKitbrowser 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
Parts of this article (those related to JavaFX Mobile) need to be updated. The reason given is: Many things have changed since then. Please help update this article to reflect recent events or newly available information.(June 2023)
JavaFX Mobile was the implementation of the JavaFX platform for rich web applications aimed at mobile devices. 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, Windows Mobile, and proprietary real-time operating systems.
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.
Components
The JavaFX platform includes the following components:
The JavaFX 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.
History
Releases after version bump
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.[11]
JavaFX 8 adds several new features, including:[12]
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)[24]
Early releases
JavaFX Script, the scripting component of JavaFX, began life as a project by Chris Oliver called F3.[25]
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 TrueMotionVideo 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 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.[26]
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[26]) announced officially on February 12, 2009.
JavaFX 1.2 (named Marina[26]) was released at JavaOne on June 2, 2009. This release introduced:[27]
Windows Mobile Runtime with Sun Java Wireless Client
JavaFX 1.3 (named Soma[26]) was released on April 22, 2010. This release introduced:[28]
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[26]) 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.
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 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 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.[29][30]
On April 27, 2012, Oracle released version 2.1 of JavaFX,[31] which includes the following main features:[32]
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,[33] which includes the following main features:[34]
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.[11]
Oracle wrote in its Client Support Roadmap that JavaFX new fixes will continue to be supported on Java SE 8 through March 2025.[36] 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.[37]
Availability
As of March 2014 JavaFX is deployed on Microsoft Windows, OS X, and Linux.[38] Oracle has an internal port of JavaFX on iOS and Android.[39][40] Support for ARM is available starting with JavaFX 8[41] 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.[42][43]
Starting with version 8u33 of JDK for ARM, support for JavaFX Embedded has been removed.[44]
Support will continue for x86-based architectures.[45]
A commercial port of JavaFX for Android and iOS has been created under the name "Gluon".[6]
License
There are various licenses for the previous modules that used to compose the JavaFX runtime:
During development, Sun explained they will roll out their strategy for the JavaFX licensing model for JavaFX first release.[49] 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 formats, and will continue to open-source the JavaFX runtime, and decouple this core from the proprietary parts licensed by external parties.[50]
^"F3 ( Chris Oliver's Weblog)". 2012-01-06. Archived from the original on 2012-01-06. Retrieved 2016-08-20.{{cite web}}: CS1 maint: bot: original URL status unknown (link)