OpenJDK vs. Oracle JDK: What the Java Experts Say
Should you use the latest OpenJDK or Oracle JDK? Here, we compare OpenJDK vs. Oracle JDK and share the biggest difference between OpenJDK vs. Oracle JDK.
Read along or jump to the section that interests you most:
- What Is Oracle Java?
- What Is the Difference Between OpenJDK and Oracle JDK?
- So, Is OpenJDK the Same As Oracle JDK?
- What About OpenJDK vs. Oracle JDK Performance?
- OpenJDK vs. Oracle JDK: Other Considerations
What Is Oracle Java (also known as Oracle JDK)?
When Oracle acquired Sun Microsystems in 2009, they also acquired the licensing rights to Java, a set of computer software and specifications developed by Sun Microsystems. Java became Oracle Java, also know as Oracle JDK.
Initially, Java licenses were free, but in 2019, Oracle announced that they would start charging for Java SE 8 licenses and users would need to pay for commercial subscriptions to get updates and access to support. That's why many began switching from Oracle JDK to OpenJDK, which is free.
What Is the Difference Between OpenJDK vs. Oracle JDK?
The biggest difference between OpenJDK and Oracle JDK is that OpenJDK is open source Java with a GNU General Public License and Oracle JDK requires a commercial license under Oracle Binary Code License Agreement. This results in support and cost differences. In terms of build, OpenJDK and Oracle JDK are identical.
Since January 2019, businesses now need to purchase a commercial license (from Oracle) in order to receive software updates. Further details are available at the Oracle Java SE Support Roadmap page.
Is OpenJDK the Same As Oracle JDK?
OpenJDK has the same code as OracleJDK, depending on what provider you're using. The key difference (as stated above) is that OpenJDK is an open source java development kit, whereas Oracle JDK is closed source.
To help understand the differences between the two, we reached out to Java experts to get their thoughts. Here’s the questions we posed to each expert:
- What would you recommend to companies with production software running on Java SE 8, who have not yet purchased subscriptions?
- What are the pros and cons of using OpenJDK vs. Oracle JDK?
What About OpenJDK vs. Oracle JDK Performance?
Oracle JDK performance used to be better than OpenJDK, but that is changing. OpenJDK's performance is continually improving. The OpenJDK builds are becoming more stable with the contributions of the OpenJDK community. And when combined with enterprise support, OpenJDK performance is top-notch.
Can I Use OpenJDK For Commercial?
You can use OpenJDK for commercial software projects. OpenJDK can be a good replacement for Oracle JDK in this respect.
Forrester Report: Weigh Your Options For Java Support
Stuck deciding between OpenJDK and Oracle JDK? Get guidance in this Forrester report.
OpenJDK vs. Oracle JDK: Other Considerations
Below are expert recommendations for companies with production software running on Java SE 8, who have not yet purchased subscriptions.
Consider the Costs of Your Oracle JDK
Java expert, Dr. Heinz M. Kabutz said, “I would recommend that they move over to OpenJDK 11 as soon as possible. If they have to stay with Java SE 8, then I would evaluate which company offers the best value for the money”.
“Either go or get off the pot. Oracle JDK 8 has received what will likely be the last free update and Java 11 was never free so make a plan before you get backed into a corner. OpenJDK is 99% the same code as Oracle JDK (depending on what provider you're getting it from) so what this really boils down to is support.”
Consider Your Java Support Needs
Brad Wood, architect and developer prompts an important question to consider, “If a CVE comes out tomorrow, how soon do you want to be guaranteed a have a patch available? We just saw this play out a couple weeks ago when providers such as AdoptOpenJDK had builds of OpenJDK 8u202 within days of Oracle's release. That sort of turnaround is fine for most companies and if you want a warm fuzzy feeling of paying someone to promise they get builds to you quickly, there are companies such as Azul charging a lot less for their OpenJDK support than Oracle is”.
Importance of Choosing OpenJDK Now
Giorgos Gaganis, software engineer, speaks of the urgency to migrate: “For companies that are currently evaluating getting subscriptions vs. migrating to newer versions, my recommendation is to also take into account in their analysis the cost of lost opportunity. The more it is postponed, the more difficult it becomes to adopt the latest version. This is important as we are seeing a lot of innovation coming.”
Justin Reock, chief architect, makes his case for migrating: “Begin planning for a move to a GPL variant of Java today. Not just to avoid exorbitant costs from Oracle, but to free yourself from the grip of a software company who is advertising through this change that they can assert real, financial control of your infrastructure. If Oracle is brazening enough to have taken this step now, what might they believe they can get away with later down the road?
A move to OpenJDK or another variant is in most cases an apples-to-apples migration. If you have modernized your SDLC and established process and infrastructure for effective CI/CD, this really shouldn’t look much different to you than a normal release. Regression testing should be performed, but the migration itself takes only a few steps.
More complex or niche builds may require some code refactor depending on your design principles, but for the most part the runtime environment is similar enough that you won’t notice a difference. A healthy migration strategy should always start with a thorough inventory and risk analysis, and your upgrade roadmap will become clearer after performing that diligence.”
Final Thoughts on Oracle JDK and OpenJDK
OpenJDK is modifiable and you can contribute to and improve it. If Oracle continues to isolate itself from open software communities, OpenJDK could fork into a project similar to Kotlin, and we might even see the bulk of the innovative work move into that project and away from Oracle altogether.
Looking to get started with OpenJDK? OpenLogic by Perforce provides OpenJDK support.
Consult one of our OpenJDK experts. We can help you migrate from Oracle JDK to OpenJDK. And we can support you along your OpenJDK journey, with better support than Oracle and a better ROI.
About the Experts Interviewed
Stephen Colebourne: Creator, Joda projects
Stephen Colebourne (@jodastephen) is the creator of Joda projects.
Dr. Heinz M. Kabutz from JavaSpecialists.eu
Dr. Heinz Kabutz (@heinzkabutz) is a Java expert with JavaSpecialists.eu.
Brad Wood, lead architect and developer advocate
Brad Wood (@bdw429s) is Lead Architect and Developer Advocate at Ortus Solutions, Corp.
Giorgos Gaganis: software engineer, blogger
Giorgos Gaganis (@ggaganis) is a software engineer and blogger who’s based in Greece.
Justin Reock: Chief Architect at OpenLogic
Justin Reock (@jreock) is a free software evangelist and the Chief Architect for OpenLogic. He resides in Asheville, NC.