Java_Magazine_NovemberDecember_2018

(singke) #1

62


//java present and future/


J


avaFX is now an open project, separate from the JDK. Starting with Java 11, the JavaFX APIs
are not included in the Oracle JDK builds or in the OpenJDK binaries. However, JavaFX is still
being developed as a project in the OpenJDK initiative. Instead of being bundled with the binary
releases of the core JDK builds, it is now available as a separate SDK, as well as via artifacts in
Maven Central. The Maven Central repository enables developers to use JavaFX via build tools
such Maven and Gradle in the same way they would use any other Java library.
Although it’s a relatively young UI framework, JavaFX already has an interesting history.
Initially, the JavaFX compile and runtime environment, which contains Java class files, platform-
specific native libraries, and resources (such as CSS and property files) was contained in an SDK
that had to be downloaded separately and configured to work with the JDK. Developers working
with JavaFX, as well as all users of JavaFX applications, had to install this JavaFX SDK on their sys-
tems. Obviously, that requirement made adoption difficult.
Therefore, it was a huge win in 2012 when the JavaFX SDK became part of the JDK. From
that moment, JavaFX developers didn’t need to install a separate component to develop JavaFX
applications. JavaFX users needed only a standard JRE distribution to run JavaFX applications.
This approach made it much easier for developers to create JavaFX applications.
Technologies change, and development approaches change as well. For the following rea-
sons, the model in which the JavaFX SDK was bundled with the JDK needed to change again:
■■Libraries are pulled in from build tools. Today, developers use build tools such as Maven or
Gradle to manage software dependencies. They specify which artifacts they want to use and
what versions. The build tools make sure that the required artifacts and all their transitive
dependencies are installed on the developers’ systems. Most developers consider this a much
PHOTOGRAPH BY TON HENDRIKS easier approach than manually installing all the libraries and frameworks they depend on

The Future of JavaFX
JavaFX 11 marks a major turning point in the UI framework’s development.

JOHAN VOS

Free download pdf