Discover Azul's high-performance Java platform providing faster speed, startup, & efficiency without code changes
Support

<a href=Read OpenJDK Migration for Dummies">

OpenJDK Migration for Dummies Preview Chapter 4

Azul Special Edition

Chapter 4

Evaluating OpenJDK Distribution Providers

OpenJDK is an open-source project, and anyone is free to download the source code for a specific version of the Java Development Kit (JDK). Using the provided build scripts, anyone can compile all parts of a JDK for mainstream platforms, such as Windows running on a 64-bit Intel processor. These executables and libraries can be packaged and provided as an OpenJDK distribution, and there are lots of different distributions available. This means you have your choice of providers — from free and unsupported to commercial providers that offer all the support of Oracle Java SE and more.

It also means that it’s worthwhile educating yourself on how providers of OpenJDK differ from each other. The OpenJDK distribution you choose can affect the ease of your migration — and have an even greater impact on your Java estate’s stability and security.

IN THIS CHAPTER
check Differentiating between OpenJDK distributions
check Answering commonly asked questions
check Comparing OpenJDK distributions

Differentiating Between OpenJDK Distributions

Because all OpenJDK distributions use the same source code as a starting point, which distribution you choose will depend on a variety of other considerations.

Here are some of the most important factors to consider:

Which OpenJDK versions are supported?

As of March 2021, there were 20 versions of Java, including three releases known as Long-Term Support (LTS) releases. It’s easy to find support for the most current LTS release, but the farther back you go, the fewer providers there are to support that version. For example, Azul is one of only two providers that support JDK 6 and 7.

Which platforms are supported?

Most users run applications on mainstream operating systems like Linux and Windows and use common processors like those from Intel and AMD. If your environment includes less-common platforms like Automatic Resource Management (ARM)– based processors or perhaps the Solaris operating system, will the distribution provide builds for these?

How long will an OpenJDK version be supported?

Certain versions are classified as LTS, but how long is long? Different distributions may offer various maintenance and support lengths. Some distributions may also commit to supporting a version after they stop providing the scheduled updates. In this passive support phase, users can still report issues and, if necessary, the build provider may provide a special update containing a fix.

Are all builds Technology Compatibility Kit (TCK) tested?

Each version of Java has its own suite of TCK tests. TCK testing is vital to ensure that the binary distribution being delivered implements the specification exactly, providing full compatibility.

How quickly are JDK updates available?

The scheduled JDK updates are developed through the OpenJDK project and embargoed by the OpenJDK Vulnerability Group until a preplanned date and time. What is a distribution’s track record for providing updates within hours of the embargo lifting? Has it seen long delays in the past? Is there a timebased service-level agreement (SLA) specifying when an update is guaranteed to be available? Update speed is important because, after the embargo is lifted, details of security vulnerabilities are made public, and those who want to do so can start developing exploits. If updates only become available days or even weeks later, the possibility of systems being compromised rises exponentially.

Are stabilized JDK updates available?

Oracle Java SE provides two formats for each update: the Critical Patch Update (CPU; a stabilized security update) and Patch Set Update (PSU; the full update). To maintain the maximum level of JDK security, both are essential. Only Oracle and Azul provide both CPU and PSU updates.

Azul sets the industry standard for delivering security updates to OpenJDK on a strict SLA. Since Oracle Java SE was launched, Azul has delivered stabilized security updates within an hour of the lifting of the embargo.

A Multitude of Binaries

Commercial support providers typically offer updates for just a fraction of the JDKs that are used in production.

There are more than 2,000 possible binaries if you only consider LTS versions for the most popular Linux, Windows and macOS operating systems; for 32-bit and 64-bit x86 and ARM architectures; and for just the JDKs and Java Runtime Environments (JREs) delivered in the most popular file types. If you expand this criteria, there are potentially thousands more.

Organizations like Azul also provide binaries for additional versions of Java (Azul currently supports 6 Java versions, 14 operating systems, 7 architectures, and 4 packages).

Answering Common Questions

In addition to the questions in the preceding section, organizations that are planning a migration frequently share common concerns. Here are several broader questions that often come up about the impact of switching from the Oracle JDK to another OpenJDK distribution.

Will I lose JDK functionality if I switch?

From JDK 11 onwards, Oracle JDK has used only the source code included in the relevant OpenJDK repository. Prior to that, Oracle also included several features that were not open source.

These features are almost all associated with desktop applications
and deployment technologies. The two most obvious are the Java plug-in (required to run applets in a browser) and Java Web Start. Chapter 2 provides some specifics on both of those.

The Oracle JDK features that don’t apply just to desktops include Mission Control and the Java Advanced Management Console. Oracle open-sourced Mission Control, a low-overhead, interactive monitoring and management tool for Java workloads, and you can obtain builds from Azul and other vendors. The Java Advanced Management Console, a sysadmin tool, is available only from Oracle.

What about Oracle Java applications?

If you’re using Oracle Java applications, you should check carefully to determine whether the JDK is included in the support contract. If it isn’t included, consider which distribution is the best choice in this situation

What’s my risk of regression when using alternatives to Oracle Java?

Provided the OpenJDK distribution you choose is built from OpenJDK source code and is TCK tested, there is essentially zero chance of a functional regression created by swapping one distribution for another. Applications will behave no differently when running on an Oracle JDK alternative.

Only in a very extreme case would you notice a performance regression where an application may be slower or faster than before. This would only be because a different compiler or compiler flag was used during the build process.

Will I need to move to the latest Java JDK version?

All distributions of OpenJDK provide extended maintenance for the LTS versions of Java in the form of updates. How long these updates will continue to be delivered depends on the distribution. If you’re using an older version of the Java JDK that is still being maintained, your application will continue to receive the maximum level of security and stability from its runtime. There is no need to update to the latest Java version.

For some users, the availability of newer features and potentially improved performance will be worth investing time and resources to migrate and test applications. It’s important to understand, though, that moving to the latest Java version isn’t essential.

Will I need to recompile my application?

From the very beginning, Java used the slogan “Write once, run anywhere.” The cornerstone of this claim was that all Java runtimes would provide identical functionality. The same bytecodes would execute in the same way regardless of the operating system and chip architecture.

This concept applies equally when moving to a different distribution of OpenJDK. As long as both the current and new distributions are of the same Java version and have passed all the TCK tests, you won’t need to recompile any application code.

Sometimes changes made in an OpenJDK update can impact application stability. In this case, it may be necessary to change configuration parameters, but it still won’t be necessary to recompile the application.

Will I need to rewrite or modify my application code?

There is no need to recompile code when switching OpenJDK distributions. By extension, therefore, it isn’t necessary to modify or rewrite any application code as long as the Java version of both distributions is the same.

Even if the Java version is not the same, the code is still probably okay. The Java platform maintains excellent backward compatibility across versions. As a result, code written for one version of Java will almost always compile and run on a newer version.

Recompiling Caveats

If you do recompile existing code with a newer JDK, here are a few
things to watch out for:

» If the code is very old, you may find that certain variable names are no longer valid. Java SE 1.4 introduced assertions, and assert became a reserved word. Similarly, in Java SE 5, the introduction of enumerations resulted in enum becoming a reserved word, so not valid as a variable name.
» In the unlikely event that you’ve used a single underscore as a variable name, you’ll need to change that. As of JDK 9 this is no longer allowed.
» Prior to JDK 9, many application programming interface (API) elements (classes, interfaces, methods, and so on) had been deprecated for removal, but none had ever been removed. In JDK 11, many legacy APIs covering functionality like CORBA, JAX-B, and JAX-WS were removed. Other JDK versions have removed a few little-used APIs. You can download these libraries separately and include them via changes to your build scripts.

Comparing OpenJDK Distributions

The chart below shows some of the most popular OpenJDK distributions and how they compare from the perspective of the things we discuss in this chapter.

A full circle means that the feature/capabilities are covered 100 percent in that distribution. An empty circle means that the feature/capabilities are not covered at all. A half- or quartercircle indicates partial coverage. For example, Azul, Red Hat, and Eclipse Temurin offer IcedTea-Web as an alternative to Java Web Start, so they get 50 percent credit for the applets and Java Web Start feature. Oracle gets 100 percent credit, even though it has discontinued these features, because older builds of Oracle JDK with these features work just fine. Note that although current feature and LTS releases provided by all five distributions are TCK tested, there are no longer TCK tests available for Java 6 and 7, because these have reached “end of life” from an Oracle support perspective.

Products and Features Azul Oracle Corretto Red Hat Eclipse Temurin

Based on OpenJDK

100% Open Source, Freely Available,
no field of use restrictions

TCK Tested
(guaranteed Java SE compliance)

Patent Grant
(inherited patent rights to use the JDK)

Free Quarterly Updates
(single build combining security & enhancements)

Performance Parity
with Oracle Java SE

Multi-platform
(Windows, Linux, macOS, Solaris)

Native Alpine Linux (musl libc)

Multiple Installers & Packages
(tar, deb, MSI, DMG, JDK/JREs)

Java Flight Recorder and Mission Control (for Java 8)

OpenFX (JavaFX)

LTS (Java 8, 11, …) and non-LTS versions

Java 7 Extended Support

Java 6 Extended Support

32-bit Support

Java Web Start and Applets

For a full discussion of the features and capabilities compared in this matrix and a comprehensive listing of OpenJDK distributions, see www.openjdk-migration.com/openjdk-distributions.

Download the Full OpenJDK Migration for Dummies eBook