Oracle JDK vs OpenJDK
October 22, 2019

Deciding Between Oracle JDK and OpenJDK? This Self-Audit Can Help

Open Source

The Pros and Cons of Open JDK vs Oracle JDK

Deciding which Java SE computing platform to implement is a big decision. The expense of licensing with Oracle is often the most significant issue for potential users. However, there are other differences that are important to look at to determine which platform best suits your needs. Below are various features and functions to consider when choosing your platform.

Deployment Installation and Automation

Getting your feet off the ground is essential. Some platforms lack builds and installers to help deploy OpenJDK. A Windows build for instance must be built from scratch, and OpenLogic can assist with OpenJDK Windows builds and their deployment. Most Linux distributions have a package installation for OpenJDK.

Is deployment automation required? Oracle has a license agreement that must be clicked on, which prevents automating the installation. OpenJDK uses the platform’s package manager for automated deployment, which has no license agreement to click through.  

The Importance of Licensing

Oracle JDK uses the Oracle Binary Code License Agreement in combination with the GNU General Public License (GPL) v2 with the Classpath Exception (GPLv2+CE). Similarly, OpenJDK has the GNU General Public License version 2 with linking exception license. The important difference to note here is that the Oracle JDK license restricts you from using the JDK in a production environment for business use. OpenJDK has no such restriction.

New Release Frequency

Are frequent updates a requirement for you? Oracle JDK will have Long Term Support (LTS) releases every three years, and OpenJDK will release every six months. This means that OpenJDK will support new releases until the next release in six months. The latest LTS release is OpenJDK 11, which was released in September 2018. The non-LTS release version 12 in March 2019. Non-LTS OpenJDK 13 is scheduled for September 2019. 

Patching Capabilities

Do you need early access to security fixes? If a CVE is issued and patched for Oracle JDK, then the patch may take a few days to trickle down to the OpenJDK build. That’s because Oracle security patches are ported to OpenJDK by third-party vendors. For the financial industry, a few days could be an eternity.

Key Differences for Important Platform Features

Oracle JDK has commercial features that are not available with OpenJDK. For instance:

  •  JavaFX is not included in OpenJDK by default.
  • Oracle JDK has more options for garbage collection than OpenJDK.
  • Java Mission Control (JMC)- - a profiling and diagnostics tool- - and JDK Flight Recorder (JFR) have been open sourced since JDK 11 and are available as a separate download for OpenJDK.
  • The Oracle JDK project converged with OpenJDK as of version 11, which is good news for the future of the OpenJDK project. For previous versions of Java, the font engines were different with Oracle JDK using font renderers and OpenJDK using TrueType fonts. For Java 11, both projects will use the same font renderer.

Consider Your Support Options

Having a wealth of practical experience in supporting your implementation of Java SE is crucial for success. However, do you want to get that support from one vendor or a community? Oracle JDK is supported by Oracle.  OpenJDK has the support of the user community and you can also get a single source of tier-one support for it from OpenLogic by Perforce. Plus, OpenLogic delivers long-term support for OpenJDK versions, such as Jave 8, which the community no longer supports.

Next Steps

All of the factors covered above should be strongly considered when choosing a JVM, especially with large deployments. Switching out a JDK is not a simple drop and replace. Navigating migration is a process. If you choose a commercial JVM such as Oracle JDK, the lock-in can be very expensive down the road as your application grows. OpenJDK is a viable free alternative that can get enterprise support for from OpenLogic.

If you’re already using Oracle JDK and are considering a switch, read this datasheet to learn more about just how similar Oracle JDK and OpenJDK are — except in terms of price and lock-in. 

Why should you move to OpenJDK?