What is the reason to use OpenJDK?

November 2017: At the time this question was asked, the reasons for choosing between OpenJDK and Oracle JDK include:

  • Availability of builds / installers for specific platforms. For example, last time I checked there were no Oracle JDK distros in ".deb" format for Debian / Ubuntu. And no OpenJDK builds for Windows.

  • Oracle JDK has some commercial features that can be enabled by people who have paid. They are not present on OpenJDK.

  • Oracle JDK has an annoying click-through license. This is a pain if you are trying to automate deployment; e.g. to cloud VMs. By contrast, OpenJDK on Linux (at least) can be installed and updated using the platform's package manager.

  • There may be issues if you wanted commercial support for OpenJDK.

There were no substantive license differences between Oracle JDK and OpenJDK if you just plan to use the software. (There are some constraints on binary redistribution for Oracle JDK, but they are about shipping non-standard or stripped-down versions of the Java platform.)

In the future, some of these differences will go away, according to this blog page:

  • Faster and Easier Use and Redistribution of Java SE

Update in December 2018:

  • As of January 2019, Oracle JDK Java 8 will be EOL for commercial uses. (But free support will continue until January 2020 for personal use.) 1

  • Java 9 and Java 10 are EOL.

  • Commercial uses of Oracle JDK Java 11 and later require a support contract or a subscription from Oracle. OpenJDK Java builds do not have this requirement.

  • Oracle do not provide support for OpenJDK Java builds, but support is available from 3rd parties. Third parties will also port Oracle security fixes to OpenJDK builds.

Further reading:

  • Java Is Still Free
  • OpenJDK Life Cycle and Support Policy (RedHat)
  • The future of Java and OpenJDK updates without Oracle support
  • What has changed in Java Release and Update Availability? (Azul Systems)
  • AdoptOpenJDK Support

1 EOL stands for end-of-life. An end-of-life (EOL) product is a product that does not receive continuing support, either because existing marketing, support and other processes are terminated, or it is at the end of its useful life.


Other Answers are correct. Here is some other information as well, including vital changes as of early 2021.

Source-code versus Binaries/installers

understand the differences between Oracle JDK and Open JDK.

To sum it up: source-code versus binaries/installers.

  • OpenJDK is an open-source project, implementing the Java Specifications, JSRs, and JEPs that define the Java platform. This project publishes only source-code, not binaries or installers to get Java running on your computer (except for some early-access builds). Oracle is the principal participant in the OpenJDK project, alongside IBM & Red Hat, Apple, SAP, Azul Systems, Microsoft, and others.
  • Many companies provide distributions of OpenJDK for installation, as binaries or installers. Oracle is one such company.

Oracle actually provides two such products:

  • Oracle JDK
    A commercial product, with paid support plans. (Free-of-cost only for development & testing, not deployment. Read their terms.)
  • jdk.java.net
    A build of the OpenJDK source-code, freely available, unsupported.

Oracle has declared their intention to keep their commercial product Oracle JDK at feature-parity with OpenJDK. Oracle even went so far as to open-source and make available at no cost their formerly commercial tools Mission Control and Flight Recorder, both now a part of OpenJDK. So there is nearly no practical difference. One significant difference is that the Oracle company reserves the right to rapidly supply their paid support customer base with urgent patches not currently found in OpenJDK. Ditto for other vendors selling support.

[And for the record, Oracle offers a third implementation of Java, GraalVM, which is a very specialized product.]

Here is a flowchart graphic I made to help guide you in selecting a provider of a Java implementation.

Flowchart guiding you in choosing a vendor for a Java 11 implementation

And here is a list of motivations you might consider in choosing a distribution.

Motivations in choosing a vendor for Java

Tags:

Java

Licensing