Platform Cross-platform | ||
Initial release December 4, 2008; 8 years ago (2008-12-04) Stable release 8 / March 18, 2014; 2 years ago (2014-03-18) Operating system |
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. JavaFX is intended to replace Swing as the standard GUI library for Java SE, but both will be included for the foreseeable future. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linux, and macOS.
Contents
- Technical highlights
- Design highlights
- JavaFX platform components
- JavaFX Mobile
- History
- JavaFX 10
- JavaFX 11
- JavaFX 12
- JavaFX 13
- JavaFX 131
- JavaFX 20
- JavaFX 21
- JavaFX 22
- JavaFX 8
- JavaFX 9
- Future work
- Example Code
- Platforms
- License
- References
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 could run on any desktop that could run Java SE, on any browser that could run Java EE, or on any mobile phone that could run Java ME.
JavaFX 2.0 and later is implemented as a "native" Java library, and applications using JavaFX are written in "native" Java code. JavaFX Script has been scrapped by Oracle, but development is being continued in the Visage project. JavaFX 2.x does not support the Solaris operating system or mobile phones; however, Oracle plans to integrate JavaFX to Java SE Embedded 8, and Java FX for ARM processors is in developer preview phase.
On desktops, JavaFX supports Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, macOS and Linux operating systems. Beginning with JavaFX 1.2, Oracle has released beta versions for OpenSolaris. On mobile, JavaFX Mobile 1.x is capable of running on multiple mobile operating systems, including Symbian OS, Windows Mobile, and proprietary real-time operating systems.
Technical highlights
Design highlights
Sun Microsystems licensed a custom typeface called Amble for use on JavaFX powered devices. The font family was designed by mobile user interface design specialists Punchcut and is available as part of the JavaFX SDK 1.3 Release.
JavaFX platform components
JavaFX 2.x platform includes the following components:
- The JavaFX SDK: runtime tools. Graphics, media web services, and rich text libraries. Java FX 1.x also included JavaFX compiler, which is now obsolete as JavaFX user code is written in Java.
- 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 JavaFX 2 support you need at least NetBeans 7.1.1 . For Eclipse users there is a community-supported plugin hosted on Project Kenai.
- JavaFX scene builder: This was introduced for Java FX 2.1 and later. A user interface (UI) is created by dragging and dropping controls from a palette. This information is saved as an FXML file, a special XML format.
- Tools and plugins for creative tools (a.k.a. Production Suite): Plugins for Adobe Photoshop and Adobe Illustrator that can export graphics assets to JavaFX Script code, tools to convert SVG graphics into JavaFX Script code and preview assets converted to JavaFX from other tools (currently not supported in JavaFX 2.x versions)
JavaFX Mobile
JavaFX Mobile was the implementation of the JavaFX platform for rich Internet 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.
History
JavaFX Script, the scripting component of JavaFX, began life as a project by Chris Oliver called F3.
Sun Microsystems first announced JavaFX at the JavaOne Worldwide Java Developer conference on 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 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.
JavaFX 1.0
On December 4, 2008 Sun released JavaFX 1.0.2
JavaFX 1.1
JavaFX for mobile development was finally made available as part of the JavaFX 1.1 release (named Franca) announced officially on February 12, 2009.
JavaFX 1.2
JavaFX 1.2 (named Marina) was released at JavaOne on June 2, 2009. This release introduced:
JavaFX 1.3
JavaFX 1.3 (named Soma) was released on April 22, 2010. This release introduced:
JavaFX 1.3.1
This version was released on August 21, 2010. This release introduced:
JavaFX 2.0
This version (named Presidio) was released on October 10, 2011. This release introduced:
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.
JavaFX 2.1
On April 27, 2012, Oracle released version 2.1 of JavaFX, which includes the following main features:
JavaFX 2.2
On August 14, 2012, Oracle released version 2.2 of JavaFX, which includes the following main features:
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 Java FX 2.2, JavaFX is bundled to be installed with Oracle Java SE platform.
JavaFX 8
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.
JavaFX 8 adds several new features, including:
JavaFX 9
JavaFX 9 features are currently centered on extracting some useful private APIs from the JavaFX code to make these APIs public:
Future work
Oracle also announced in November 2012 the open sourcing of Decora, a DSL Shader language for JavaFX allowing to generate Shaders for OpenGL and Direct3D.
Example Code
The following is a rather simple JavaFX-based program. It displays a window (a stage
) containing a button.
Platforms
As of March 2014 JavaFX is deployed on Microsoft Windows, OS X, and Desktop Linux. Oracle has an internal port of JavaFX on iOS and Android Linux. Support for ARM is available starting with JavaFX 8 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. Starting with version 8u33 of JDK for ARM, support for JavaFX Embedded has been removed. Support will continue for x86-based architectures.
License
There are various licenses for the modules that compose the JavaFX runtime:
During development, Sun explained they will roll out their strategy for the JavaFX licensing model for JavaFX first release. After the release, 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.
At JavaOne 2011, Oracle Corporation announced that JavaFX 2.0 would become open source. Since December 2011, Oracle began to open source the JavaFX code under the GPL+linking exception.
In December 2012, new portions of the JavaFX source code have been Open-Sourced by Oracle: