Should you use the latest OpenJDK or Oracle JDK? Here, we compare OpenJDK vs. Oracle JDK and share the biggest difference between OpenJDK and Oracle JDK.
Read along or jump to the section that interests you most:
Java is a set of computer software and specifications originally developed by Sun Microsystems, but acquired by Oracle.
Oracle announced in 2019 that they would start charging for Java SE 8 licenses. That's why many are considering switching from Oracle JDK to OpenJDK.
The biggest difference between OpenJDK and Oracle JDK is licensing. OpenJDK is completely open source Java with a GNU General Public License. Oracle JDK requires a commercial license under Oracle Binary Code License Agreement. But there are many other differences within support and cost, too. Keep reading to learn more.
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.
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:
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.
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 SupportStuck deciding between OpenJDK and Oracle JDK? Get guidance in this Forrester report.Download Forrester Report
Stuck deciding between OpenJDK and Oracle JDK? Get guidance in this Forrester report.
Download Forrester Report
Below are expert recommendations for companies with production software running on Java SE 8, who have not yet purchased subscriptions.
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.”
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”.
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.”
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.
Talk to a Java Expert
Stephen Colebourne (@jodastephen) is the creator of Joda projects.
Dr. Heinz Kabutz (@heinzkabutz) is a Java expert with JavaSpecialists.eu.
Brad Wood (@bdw429s) is Lead Architect and Developer Advocate at Ortus Solutions, Corp.
Giorgos Gaganis (@ggaganis) is a software engineer and blogger who’s based in Greece.
Justin Reock (@jreock) is a free software evangelist and the Chief Architect for OpenLogic. He resides in Asheville, NC.