OpenJDK (Open Java Development Kit) is a free and open-source implementation of the Java Platform, Standard Edition (Java SE).[2] It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GPL-2.0-only with a linking exception. Were it not for the GPL linking exception, components that linked to the Java Class Library would be subject to the terms of the GPL license. OpenJDK is the official reference implementation of Java SE since version 7.[3][4][5]

OpenJDK
Developer(s)Oracle, OpenJDK and Java Community, Red Hat, Azul Systems, IBM, Microsoft, Amazon, Apple, SAP
Initial releaseMay 8, 2007; 16 years ago (2007-05-08)
Stable release
22[1] Edit this on Wikidata / 19 March 2024; 24 days ago (19 March 2024)
Repository
Written inC++ and Java
Operating systemLinux, FreeBSD, macOS, Microsoft Windows, OpenIndiana, OpenVMS; several other ports in progress
TypeJava platform
LicenseGPL-2.0-only with linking exception
Websiteopenjdk.org

Components

The OpenJDK project produces a number of components: most importantly the virtual machine (HotSpot), the Java Class Library and the Java compiler (javac).

The web-browser plugin and Web Start, which form part of Oracle Java, are not included in OpenJDK. Sun previously indicated that they would try to open-source these components, but neither Sun nor Oracle have done so.[6]The only currently available free plugin and Web Start implementations as of 2016 are those provided by IcedTea.[citation needed]

OpenJDK 9+ supports AOT compilation (jaotc) using GraalVM (JEP 295).[7] The experimental -XX:+EnableJVMCIProduct flag enables the use of Graal JIT (JEP 317).[8]

OpenJDK versions

OpenJDK was initially based only on the JDK 7 version of the Java platform.[9]

Since JDK 10, the effort to produce an open-source reference implementation of the Java SE Platform was moved over to the JDK Project.[10] Unlike past JDK Release Projects, which produced just one feature release and then terminated, this long-running project will produce all future JDK feature releases and will ship a feature release every six months according to a strict, time-based model.[11]

OpenJDK builds

Due to Oracle no longer releasing updates for long-term support (LTS) releases under a permissive license, others have begun offering builds.[12][13][14] Linux distributions have always offered their own builds, and Windows also offers one now, which can be installed with the Windows Package Manager. For example, to install OpenJDK 17:

winget install Microsoft.OpenJDK.17


BuildOrganizationLTSPermissive
license
TCK
tested
Built
unmodified
Commercial
support
AdoptOpenJDK[15]
(moved to Eclipse Temurin at Adoptium in 2021)[16]
YesYesYesOptionalOptional (IBM)
Alibaba Dragonwell[17]AlibabaYesYesNoNoNo
Amazon Corretto[18]AmazonYesYesYesYesOptional (on AWS)
Azul Zulu[19]Azul SystemsYesYesYesNoOptional
BellSoft Liberica JDK[20]BellSoftYesYesYesNoOptional
Eclipse Temurin[21]AdoptiumYesYesYesNoOptional (Azul, IBM, Red Hat)
IBM Java SDK[22]
(moved to IBM Semeru Runtime Certified Edition at version 11)
IBMYesNoYesNoYes
IBM Semeru Runtime Certified Edition[23]IBMYesNo[24]YesNoOptional (IBM)
IBM Semeru Runtime Open Edition[25]IBMYesYes[24]NoNoOptional (IBM)
JetBrains Runtime[26]JetBrainsYesYesNoNoNo
Microsoft Build of OpenJDK[27]MicrosoftYesYesYesNoOptional (on Azure)
ojdkbuild[28]
(Discontinued)
YesYesNoYesNo
OpenLogic OpenJDK[29]OpenLogicYesYesNo[citation needed]NoOptional
GraalVM Community Edition[30]GraalVMNo[citation needed]YesYesNoNo
Oracle GraalVM Enterprise Edition[31]OracleYesNoYesNoYes
Oracle Java SE[32]OracleYesNoYesNoYes
Oracle OpenJDK[33]OracleNo[34]Yes[35]YesNo[36][37]No
Red Hat build of OpenJDK[38]Red HatYesYesYesNoYes
SAP SapMachine[39]SAPYesYesYesNoOptional (for SAP products)
Tencent KonaJDKTencentYesYesYesNoOptional

IcedTea and inclusion in software distributions

In order to bundle OpenJDK in Fedora and other free Linux distributions, OpenJDK needed to be buildable using only free software components. Due to the encumbered components in the class library and implicit assumptions within the build system that the JDK being used to build OpenJDK was a Sun JDK, this was not possible. To achieve openness, Red Hat started the IcedTea project in June 2007.[40]It began life as an OpenJDK/GNU Classpath hybrid that could be used to bootstrap OpenJDK, replacing the encumbrances with code from GNU Classpath.[41][42]

On November 5, 2007, Red Hat signed both the Sun Contributor Agreement and the OpenJDK Community TCK License.[43] One of the first benefits of this agreement is tighter alignment with the IcedTea project, which brings together Fedora, the Linux distribution, and JBoss, the application server, technologies in a Linux environment. IcedTea provided free software alternatives for the few remaining proprietary sections in the OpenJDK project.

In May 2008, the Fedora 9[44][45] and Ubuntu 8.04[46]distributions included IcedTea 6, based completely on free and open source code.[47] Fedora 9 was the first version to be shipped with IcedTea6, based on the OpenJDK6 sources from Sun rather than OpenJDK7. It was also the first to use OpenJDK for the package name (via the OpenJDK trademark agreement) instead of IcedTea.[44] Ubuntu also first packaged IcedTea7[48] before later moving to IcedTea6. Packages for IcedTea6 were also created for Debian and included in Lenny. On July 12, 2008, Debian accepted OpenJDK-6 in unstable,[49][50] and it later was included in stable.[51] OpenJDK is also available on openSUSE,[52] Red Hat Enterprise Linux and RHEL derivatives such as CentOS.[53]

In June 2008, Red Hat announced that the packaged binaries for OpenJDK on Fedora 9, built using IcedTea 6, had passed the Technology Compatibility Kit tests and could claim to be a fully compatible Java 6 implementation.[54] In July 2009, an IcedTea 6 binary build for Ubuntu 9.04 passed all of the compatibility tests in the Java SE 6 TCK.[55]

Since August 2008, OpenJDK 7 is usable on macOS and other BSD variants.[56]

On Android Nougat, OpenJDK replaced the now-discontinued Apache Harmony as the Java libraries in the source code of the mobile operating system. Google was in a legal dispute with Oracle over claims of copyright and patent infringement through its use of re-implementations of copyrighted Java APIs via Harmony. While also stating that this change was to create a more consistent platform between Java on Android and other platforms, the company admitted that the switch was motivated by the lawsuit, arguing that Oracle had authorized its use of the OpenJDK code by licensing it under the GPL.[57]

History

Sun's promise and initial release

Sun announced in JavaOne 2006 that Java would become open-source software,[58][59] and on October 25, 2006, at the Oracle OpenWorld conference, Jonathan Schwartz said that the company intended to announce the open-sourcing of the core Java Platform within 30 to 60 days.[60]

Sun released the Java HotSpot virtual machine and compiler as free software under the GNU General Public License on November 13, 2006, with a promise that the rest of the JDK (which includes the Java Runtime Environment) would be placed under the GPL by March 2007, "except for a few components that Sun does not have the right to publish in source form under the GPL".[61] According to free-software advocate Richard Stallman, this would end the "Java trap", the vendor lock-in that he argues applied to Java and programs written in Java.[62]

Release of the class library

Following their promise to release a Java Development Kit (JDK) based almost completely on free and open-source code in the first half of 2007,[63] Sun released the complete source code of the Java Class Library under the GPL on May 8, 2007, except for some limited parts that had been licensed to Sun by third parties and Sun was unable to re-license under the GPL.[64] Included in the list of encumbered parts were several major components of the Java graphical user interface (GUI). Sun stated that it planned to replace the remaining proprietary components with alternative implementations and to make the class library completely free.

When initially released in May 2007, 4% of the OpenJDK class library remained proprietary.[65] By the appearance of OpenJDK 6 in May 2008, less than 1% (the SNMP implementation,[66] which is not part of the Java specification) remained,[44] making it possible to build OpenJDK without any binary plugs.[66] The binary plug requirement was later dropped from OpenJDK 7 as part of b53 in April 2009.[67]

This was made possible, over the course of the first year, by the work of Sun Microsystems and the OpenJDK community. Each encumbrance[68] was either released as free and open-source software or replaced with an alternative. Beginning in December 2010, all the so-called binary plugs were replaced by open-source replacements, making the whole JDK open sourced and the binary plugs not necessary anymore.[69]

Community improvements

On November 5, 2007, Red Hat announced an agreement with Sun, signing Sun's broad contributor agreement (which covers participation in all Sun-led free and open-source software projects by all Red Hat engineers) and Sun's OpenJDK Community Technology Compatibility Kit (TCK) License Agreement (which gives the company access to the test suite that determines whether a project based on OpenJDK complies with the Java SE 6 specification).[70]

Also in November 2007, the Porters Group was created on OpenJDK to aid in efforts to port OpenJDK to different processor architectures and operating systems. The BSD porting project led by Kurt Miller and Greg Lewis and the Mac OS X porting project (based on the BSD one) led by Landon Fuller have expressed interest in joining OpenJDK via the Porters Group. As of January 2008, both are part of the mailing list discussions. Another project pending formalization on the Porters Group is the Haiku Java Team led by Bryan Varner.[71]

In December 2007, Sun moved the revision control of OpenJDK from TeamWare to Mercurial (and later to Git and GitHub), as part of the process of releasing it to open-source communities.[72][73]

OpenJDK has comparatively strict procedures of accepting code contributions: every proposed contribution must be reviewed by another OpenJDK committer and the contributor must have signed the Sun/Oracle Contributor Agreement (SCA/OCA).[74] Preferably, there should also be a jtreg[75] test demonstrating the bug has been fixed. Initially, the external patch submission process was slow[76] and, until September 2008, commits to the codebase were only made by Sun engineers.[77] The process has improved and, as of 2010, simple patches and backports from OpenJDK 7 to OpenJDK 6 can take place within hours rather than days.[78]

In 2011, an unofficial port of OpenJDK 6.0 to OS/2 was first released.[79] This port is included in the OS/2 derivative ArcaOS.[80]

On 25 September 2013, Microsoft and Azul Systems collaborated to create Zulu,[81] a build of OpenJDK for users of the Windows Azure cloud. Zulu is available as a free download from the community site Zulu.org. It is also possible to get Zulu on Amazon Web Services[82] via Canonical's Juju Charm Store,[83] the Docker Hub,[84] and Azul Systems repositories. Azul contributes bug fixes and enhancements back to the OpenJDK project and has several project committers on staff.[85] Red Hat resigned leadership of OpenJDK 6 at the beginning of 2017 and this was then taken up by Azul Systems.[86][87]

Since April 2016 there are unsupported community builds of OpenJDK for Microsoft Windows on GitHub in the project ojdkbuild which are released in pace with updates for Oracle JDK. From build 8u151 on, the MSI-installer offers an optional component for using Java Web Start based on the IcedTea-Web project.

In 2020, a port of OpenJDK 8 to OpenVMS on the Itanium platform was released.[88]

The number of external contributions to OpenJDK is growing since project inception. OpenJDK 11, released in September 2018, received 20% of external fixes[89] and brought 17 new JEPs (features), out of which 3 were contributed by the community. Namely, JEP 315: "Improve Aarch64 Intrinsics" (contributed by BellSoft), JEP 318: "Epsilon: A No-Op Garbage Collector" (by Red Hat) and JEP 331: "Low-Overhead Heap Profiling" (contributed by Google).[90]

Collaboration with IBM, Apple, and SAP

On October 11, 2010, IBM, by far the biggest participant in the Apache Harmony project, decided to join Oracle on the OpenJDK project, effectively shifting its efforts from Harmony to OpenJDK.[91][92] Bob Sutor, IBM's head of Linux and open source, blogged that "IBM will be shifting its development effort from the Apache Project Harmony to OpenJDK".[93]

On November 12, 2010, Apple Inc. (just three weeks after deprecating its own Java runtime port[94]) and Oracle Corporation announced the OpenJDK project for Mac OS X. Apple will contribute most of the key components, tools and technology required for a Java SE 7 implementation on Mac OS X, including a 32-bit and 64-bit HotSpot-based Java virtual machine, class libraries, a networking stack and the foundation for a new graphical client.[95]

On January 11, 2011, the Mac OS X Port Project was created on OpenJDK, and Apple made the first public contribution of code to the project. The initial Apple contribution built on the OpenJDK BSD port.[96]

In July 2011, SAP AG announced that SAP officially joined the OpenJDK project.[97]

See also

References

External links