BT

InfoQ Homepage News JavaFX 14 Released

JavaFX 14 Released

This item in japanese

Bookmarks

JavaFX 14 is now publicly available for use, updating the cross-platform GUI framework that can expand a single codebase across computers, embedded devices, iOS, and Android.

The release is another milestone in the vibrant post-mortem world since Java allegedly "died" on the desktop. Software engineer Gerrit Grunwald has covered this evolution in a previous talk, "Not dead yet - Java on the desktop." Unlike the postponed James Bond film No Time to Die, Java has "no time to die" because it is widely adopted and growing.  Since the un-bundling of JavaFX as a framework outside Oracle Java, a notable community has taken up maintenance with membership from Microsoft, Gluon, Pivotal, and others. JavaFX 14 includes notable enhancements, including support for HTTP/2 in the WebView component. WebView is an embedded web browser component that enables developers to control a browser directly inside of their JavaFX application, for example to mix local Java code with an externally-hosted web application.

One driver for developers selecting the JavaFX framework is the ability to write a single application that can run across Windows, Mac, and Linux, as well as mobile phones and tablets running Android and iOS. The cross-platform capability is provided through an integration between the JavaFX framework and GraalVM. Following compilation, a single application will produce multiple outputs. Unlike the traditional Java JAR files and classpath, GraalVM will produce a single binary output per platform: one for Windows, one for iOS, and so on. When natively-compiled for iOS, the resulting JavaFX application supports current iOS capabilities such as bitcode. Capabilities for Android are similar. Developers of cross-platform applications only need to understand Java and the JavaFX framework, then GraalVM takes care of the compilation phase.

The OpenJFX community features a range of libraries and tools for developers to create applications and focus on business logic of what makes the application unique. A listing of key libraries is available through JavaFX, including existing libraries of UI frameworks like Twitter’s Bootstrap. This functions because JavaFX offers native support for CSS. For Java developers, this library provides an end result similar to what Electron offers to Node developers, except items are native rather than an entire local web browser.

Developers creating JavaFX applications have two choices for development: Java code or FXML. FXML is an XML-based layout that lets designers work on elements separate from code, using a tool like SceneBuilder. Gluon offers a publicly downloadable build of the open-source SceneBuilder tool that can be used standalone or integrated with IDEs like Apache NetBeans.

JavaFX applications also feature runtime diagnostic capabilities. As Java applications, they integrate with well-known performance monitoring tools like OpenJDK Flight Recorder, but UI diagnostic tools exist as well. One tool, Scenic View, offers features to look at a running JavaFX application and navigate its UI layout structure, similar to browser-based DOM inspection tools.

Teams looking to create graphical Java applications for a single device target or across platforms can download JavaFX as a library and use it with any Java distribution, such as AdoptOpenJDK.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.