JavaFX explained

JavaFX
Developer:Oracle Corporation
Latest Release Version:21.0.2
Latest Release Date:[1]
Operating System:Java
Platform:Cross-platform
Language:Java
Genre:Application framework
License:GPL+classpath exception[2]

JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linux (including Raspberry Pi), and macOS, as well as mobile devices running iOS and Android, through Gluon Mobile.

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

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.

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.[7]

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.[8] [9]

Sun Microsystems licensed a custom typeface called Amble for use on JavaFX-powered devices. The font family was designed by 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

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:

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.[10]

JavaFX 8 adds several new features, including:[11]

JavaFX 9 features were centered on extracting some useful private APIs from the JavaFX code to make these APIs public:

Oracle announced their intention to stop bundling JavaFX in their build of JDK 11 and later.[16] It is no longer bundled with the latest version.

JavaFX 11 was first shipped in September 2018.

JavaFX 12 was first shipped in March 2019.

JavaFX 13 shipped in September 2019.

JavaFX 14 was released in March 2020.

JavaFX 15 was released in September 2020.

JavaFX 16 was released in March 2021.

JavaFX 17 was released in September 2021. Highlights:

JavaFX 18 was released in March 2022. Highlights:

JavaFX 19 was released in September 2022. Highlights:

JavaFX 20 was released in March 2023. Highlights:

Early releases

JavaFX Script, the scripting component of JavaFX, began life as a project by Chris Oliver called F3.[23]

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 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.[24]

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) announced officially on February 12, 2009.

JavaFX 1.2 (named Marina) was released at JavaOne on June 2, 2009. This release introduced:[25]

JavaFX 1.3 (named Soma) was released on April 22, 2010. This release introduced:[26]

JavaFX 1.3.1 was released on August 21, 2010. This release introduced:

JavaFX 2.0 (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.[27] [28]

On April 27, 2012, Oracle released version 2.1 of JavaFX,[29] which includes the following main features:[30]

On August 14, 2012, Oracle released version 2.2 of JavaFX,[31] which includes the following main features:[32]

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.

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.[33]

Oracle wrote in its Client Support Roadmap that JavaFX new fixes will continue to be supported on Java SE 8 through March 2025.[34] 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.[35]

Availability

As of March 2014 JavaFX is deployed on Microsoft Windows, OS X, and Linux.[36] Oracle has an internal port of JavaFX on iOS and Android.[37] [38] Support for ARM is available starting with JavaFX 8[39] 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.[40] [41]

Starting with version 8u33 of JDK for ARM, support for JavaFX Embedded has been removed.[42]

Support will continue for x86-based architectures.[43]

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.[47] 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.[48]

At JavaOne 2011, Oracle Corporation announced that JavaFX 2.0 would become open-source.[27] Since December 2011, Oracle began to open-source the JavaFX code under the GPL+linking exception.[2] [49]

In December 2012, new portions of the JavaFX source code were open-sourced by Oracle:[50]

See also

Bibliography

External links

Notes and References

  1. Web site: Products » JavaFX. 2023-06-20.
  2. Web site: OpenJFX Project . . 2011-12-07 . 2011-12-05 . https://web.archive.org/web/20111205070900/http://openjdk.java.net/projects/openjfx/ . live .
  3. Web site: JavaFX Developer Home. www.oracle.com. 2019-06-14. 2019-07-12. https://web.archive.org/web/20190712135800/https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html. live.
  4. Web site: The Future of JavaFX and Other Java Client Roadmap Updates. Smith. Donald. March 7, 2018. June 14, 2019. November 17, 2018. https://web.archive.org/web/20181117154003/https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates. live.
  5. News: JavaFXPorts - Gluon. Gluon. 2018-05-01. en-US. 2018-05-02. https://web.archive.org/web/20180502065830/https://gluonhq.com/products/mobile/javafxports/. live.
  6. Web site: Rapid Enterprise Mobile Apps: Build, Connect, Manage with Gluon . 2017-12-16 . 2017-12-16 . 2017-12-15 . https://web.archive.org/web/20171215123649/http://gluonhq.com/ . live .
  7. Web site: JavaFX Overview (Release 8). 2021-12-26. docs.oracle.com. 2014. 2021-10-21. https://web.archive.org/web/20211021042605/https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm. live.
  8. Web site: Google Code Archive - Long-term storage for Google Code Project Hosting . Code.google.com . 2016-08-01 . 2016-04-01 . https://web.archive.org/web/20160401114024/https://code.google.com/p/visage/ . live .
  9. Web site: Visage Language . 2023-07-06 . GitHub . en . 2023-07-07 . https://web.archive.org/web/20230707162129/https://github.com/visage-lang . live .
  10. Web site: JavaFX FAQ . 2019-09-24 . Oracle.com . 2018-10-29 . https://web.archive.org/web/20181029152754/https://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html . live .
  11. Web site: JavaFX Roadmap . . 2012-11-24 . dead . https://web.archive.org/web/20121201211443/https://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html . 2012-12-01 .
  12. Web site: 3D Features Planned for Version 8 . . Chien . Yang . 2012-11-24 . 2013-12-07 . https://web.archive.org/web/20131207005653/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-October/003641.html . live .
  13. Web site: 3D Features Planned for Version 8 . . 2012-11-24 . 2013-05-02 . https://web.archive.org/web/20130502130923/https://wikis.oracle.com/display/OpenJDK/3D+Features . live .
  14. Web site: Dialog (JavaFX 9) . 2015-01-05 . dead . https://web.archive.org/web/20150105113138/http://download.java.net/jdk9/jfxdocs/javafx/scene/control/Dialog.html . 2015-01-05 .
  15. Web site: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization . Jonathan . Giles . . 2015-01-14 . 2016-01-17 . 2016-03-10 . https://web.archive.org/web/20160310171154/http://openjdk.java.net/jeps/253 . live .
  16. Web site: Gluon and JavaFX . 2018-10-29 . 2019-04-29 . https://web.archive.org/web/20190429062213/https://gluonhq.com/gluon-and-javafx/ . live .
  17. Web site: javafxports/openjdk-jfx. 2020-07-20. GitHub. en. 2020-08-03. https://web.archive.org/web/20200803191632/https://github.com/javafxports/openjdk-jfx. live.
  18. Web site: JavaFX . 2022-10-05 . Gluon . en-US . 2022-09-28 . https://web.archive.org/web/20220928185221/https://gluonhq.com/products/javafx/ . live .
  19. Web site: OpenJFX 12 Release notes . 2023-07-06 . Gluon . en-US . 2023-07-07 . https://web.archive.org/web/20230707162330/https://gluonhq.com/products/javafx/openjfx-12-release-notes/ . live .
  20. Web site: OpenJFX 13 Release notes . 2023-07-06 . Gluon . en-US . 2023-07-07 . https://web.archive.org/web/20230707161954/https://gluonhq.com/products/javafx/openjfx-13-release-notes/ . live .
  21. Web site: OpenJFX 14 Release notes . 2023-07-06 . Gluon . en-US . 2023-07-07 . https://web.archive.org/web/20230707162612/https://gluonhq.com/products/javafx/openjfx-14-release-notes/ . live .
  22. Web site: OpenJFX 15 Release notes . 2023-07-06 . Gluon . en-US . 2023-07-07 . https://web.archive.org/web/20230707162357/https://gluonhq.com/products/javafx/openjfx-15-release-notes/ . live .
  23. Web site: 2012-01-06 . F3 (Chris Oliver's Weblog) . bot: unknown . https://web.archive.org/web/20120106124512/http://blogs.oracle.com/chrisoliver/entry/f3 . 2012-01-06 . 2016-08-20.
  24. Web site: 2013-06-29 . Repositories and Releases . 2013-10-18 . 2013-10-19 . https://web.archive.org/web/20131019133723/https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases . live .
  25. Web site: Marinacci . Joshua . 2009-06-09 . Top 5 Most Important Features in JavaFX 1.2 . dead . https://web.archive.org/web/20090613001526/http://weblogs.java.net/blog/joshy/archive/2009/06/top_5_most_impo.html . 2009-06-13 . 2009-06-12.
  26. Web site: 2010-04-22 . JavaFX 1.3 Released, Improves User Experiences . dead . https://web.archive.org/web/20110430161432/http://blogs.sun.com/javafx/entry/javafx_1_3_released_delivers . 2011-04-30 . 2010-04-25.
  27. Web site: Meyer . David . 2011-10-06 . JavaFX 2.0 arrives and heads for open source . 2011-10-09 . . 2011-11-25 . 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/ . live .
  28. Web site: Brown . Greg . 2011-08-15 . Introducing FXML . 2011-10-09 . 2012-01-31 . https://web.archive.org/web/20120131185850/http://fxexperience.com/wp-content/uploads/2011/08/Introducing-FXML.pdf . live .
  29. Web site: 2012-04-27 . JDK 7u4 and JavaFX 2.1 released, now also including Mac OS X | Across the Universe . 2016-08-01 . Terrencebarr.wordpress.com . 2016-10-19 . 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/ . live .
  30. Web site: JavaFX 2.1 Release Notes . 2012-05-05 . . 2012-05-08 . https://web.archive.org/web/20120508000647/http://docs.oracle.com/javafx/2/release_notes_2-1/jfxpub-release_notes_2-1.htm . live .
  31. Web site: What's new in JavaFX 2.2 (The JavaFX Blog) . dead . https://web.archive.org/web/20160821200710/https://blogs.oracle.com/javafx/entry/what_s_new_in_javafx . 2016-08-21 . 2016-08-01 . Blogs.oracle.com.
  32. Web site: JavaFX 2.2 Release Notes . 2012-10-02 . . 2012-08-21 . https://web.archive.org/web/20120821024727/http://docs.oracle.com/javafx/2/release_notes_2-2/jfxpub-release_notes_2-2.htm . live .
  33. Web site: Open Sourcing: decora-compiler . Richard . Bair . . 2012-11-06 . 2012-11-24 . 2013-12-07 . https://web.archive.org/web/20131207005655/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-November/004292.html . live .
  34. Web site: . 2020-05-13 . Oracle Java SE Support Roadmap . 2020-05-31 . Oracle Technology Network . Oracle . 2019-12-31 . https://web.archive.org/web/20191231195356/https://www.oracle.com/technetwork/java/java-se-support-roadmap.html . live .
  35. Web site: JavaFX . 2019-05-26 . 2019-05-24 . https://web.archive.org/web/20190524215715/https://gluonhq.com/products/javafx/ . live .
  36. Web site: General Availability Download . . 2013-01-05 . 2012-12-26 . https://web.archive.org/web/20121226231541/http://www.oracle.com/technetwork/java/javafx/downloads/index.html . live .
  37. Web site: Porting JavaFX . Richard . Bair . 2012-12-03 . Mail.openjfx.dev.java.net . 2013-01-05 . 2014-06-20 . https://web.archive.org/web/20140620071107/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004670.html . live .
  38. Web site: Survey: JavaFX on tablets and mobile devices . Tomas . Brandalik . 2012-12-07 . 2013-01-05 . 2014-06-20 . https://web.archive.org/web/20140620071002/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004787.html . live .
  39. Web site: 1 JavaFX Overview (Release 8) . Docs.oracle.com . 2016-08-01 . 2016-06-23 . https://web.archive.org/web/20160623122528/http://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm . live .
  40. Web site: February Open Source Update . Richard . Bair . . 2013-02-16 . 2013-02-13 . 2013-02-14 . https://web.archive.org/web/20130214051610/http://fxexperience.com/2013/02/february-open-source-update/ . live .
  41. Web site: Oracle Announces Open Source JavaFX for iOS and Android . Infoq.com . 2013-02-13 . 2013-02-16 . 2013-02-17 . https://web.archive.org/web/20130217071221/http://www.infoq.com/news/2013/02/javafx-ios-android . live .
  42. Web site: JDK for ARM 8u33 release notes . . 2013-02-16 . 2015-03-09 . 2015-03-14 . https://web.archive.org/web/20150314172237/http://www.oracle.com/technetwork/java/javase/jdk-8u33-arm-relnotes-2406696.html . live .
  43. Web site: Raspberry Pi's mailing list: Where's JavaFX in recent Java 8u33 for the ARM ? . Dalibor . Topic . 2013-01-27 . 2015-03-09 . 2015-03-09 . https://web.archive.org/web/20150309111925/http://www.raspberrypi.org/forums/viewtopic.php?f=81&t=97367&p=678791#p678791 . live .
  44. Web site: OpenJFX Compiler Project . Openjfx-compiler.dev.java.net . 2008-06-07 .
  45. Web site: Project Scene Graph home . https://archive.today/20120306021341/http://scenegraph.dev.java.net/ . dead . 2012-03-06 . Scenegraph.dev.java.net . 2008-06-07 .
  46. Web site: JavaFX Downloads . Openjfx.dev.java.net . 2008-06-07 .
  47. Web site: Will JavaFX technology be released in open source? . 2008-06-07 . 2008-06-12 . https://web.archive.org/web/20080612174718/http://java.sun.com/javafx/faqs.jsp#2 . live .
  48. Web site: JavaFX — the road ahead . 2008-12-16 . Kaul . Jeet . 2009-01-03 . dead . https://web.archive.org/web/20081217162601/http://blogs.sun.com/meetjeet/entry/javafx_the_road_ahead . December 17, 2008 .
  49. Web site: Call for patches . https://archive.today/20130131062814/https://forums.oracle.com/forums/thread.jspa?messageID=10017677 . dead . January 31, 2013 . Richard . Bair . 2011-12-02 . . 2011-12-07 .
  50. Web site: More of JavaFX open-sourced . Pavel . Safrata . 2012-12-18 . . 2013-01-05 . 2012-12-29 . https://web.archive.org/web/20121229000929/http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/005007.html . live .