Oracle JDK vs OpenJDK and Java JDK Development Process
Last modified on December 15th, 2014 by Joe.
This article is to discuss about the difference between Oracle JDK and OpenJDK, then followed by a highlight on the JDK development process. Before going into detail let us recap on what is JDK?
What is JDK?
Java Development Kit (JDK) consists of Java Runtime Environment (JRE) along with tools to compile and debug Java code for developing Java applications. JRE consists of libraries, Java Virtual Machine (JVM), Java Pluging and Java Web Start to run Java applications. JRE as a stand-alone does not contain compilers and debugging tools.
Oracle JDK vs OpenJDK
- Oracle JDK was previously called SUN JDK and that was before the takeover by Oracle. Earlier, it was the official proprietary implementation of the Java language. After the takeover it was named as Oracle JDK and Oracle’s team maintains the JDK.
- OpenJDK is an open source implementation of the Java Standard Edition platform with contribution from Oracle and open Java community.
- OpenJDK is the official reference implementation for Java Standard Edition from Java SE 7.
- OpenJDK is released under license GPL v2 wherein Oracle JDK is licensed under Oracle Binary Code License Agreement.
- Actually, Oracle JDK’s build process builds from OpenJDK source code. So there is no major technical difference between Oracle JDK and OpenJDK.
- Apart from the base code, Oracle JDK includes, Oracle’s implementation of Java Plugin and Java WebStart. Also includes third party closed source and open source components like graphics rasterizer and Rhino respectively.
- OpenJDK Font Renderer and Oracle JDK Flight Recorder are the noticeable major difference between Oracle JDK and OpenJDK.
- Oracle JDK’s commercial components are bundled along with freely downloadable Oracle JDK and to enable that we need to run them with explicit flags.
- JRockit was the Oracle’s JVM and from Java SE 7, HotSpot and JRockit merged into a single JVM. So now we have only the merged HotSpot JVM available.
- There is no official information on how much an Oracle commercial JDK license costs. To get a commercial Oracle JDK license, we need to contact Oracle sales directly.
- OpenJDK is completely free and can be used in accordance with GPL v2 license.
- There are instances where people claim that they had issues while running OpenJDK and that got solved when switched over to Oracle JDK. These were claims made in public forums and could not be verified. Considering the fact that Oracle JDK gets its source from OpenJDK these claims are difficult to prove.
- Major Linux distributions such as Ubuntu, Fedora and Red Hat Enterprise Linux offer a OpenJDK or its variant as their default Java SE implementation.
- Twitter has its own JDK.
- Software like Android Studio, IntelliJ IDEA, Minecraft expects Oracle JDK to be used. In fact, warns.
- OpenJDK 6 is a backport to try to be compatible with Oracle JDK 6. It was taken from OpenJDK 7 b20 and Java 7 features removed and made it to be compatible with Java SE 6.
- OpenJDK 8 source code is hosted at http://hg.openjdk.java.net/jdk8
- The goal of OpenJDK 8 and OpenJDK 9 has not changed from the OpenJDK 7. They look the same, that is to provide the open source reference implementation for Java Standard Edition.
How Oracle JDK and OpenJDK is kept in Sync?
For such a huge code base it should definitely be a complex process. All of the development and bug fixes happens in OpenJDK and then they are propagated to the Oracle JDK. Security fixes happens in private forest without public code reviews unlike general fixes, then they are pushed to Oracle JDK and then to OpenJDK.
As quoted by Martijn Verburg of JClarity in StackExchange, “Some vendors also choose not to push their changes back into OpenJDK. For example both Google and Twitter have modified OpenJDK versions that they use internally with bug fixes and features that have not gone back into the main OpenJDK project.”
What is IcedTea?
IcedTea was a project started by RedHat in June 2007. It is a hybrid between OpenJDK and GNU Classpath. GNU Classpath is a GNU project that creates a free software implementation for the standard Java class library.
IcedTea is a marriage between OpenJDK and GNU Classpath. IcedTea is currently bundled default with GNU/Linux distributions such as Fedora, Gentoo and Debian. java-web-plugin one component example completely rewritten for IcedTea and name icedtea-web.
Can I Contribute to OpenJDK development?
Yes any developer can contribute to OpenJDK.
- First step is to join the OpenJDK mailing list and start with contributing to bug fixes.
- Choose a favorite bug and discuss about it and the solution you propose on the forum.
- Then after gaining consensus, put effort on it and submit the patch.
- Look for a sponsor. A sponsor is a one who is already a committer.
- Once a you get a sponsor her will take ownership of that bug and evaluate, review your patch and push it through.We can expect to reach this level only if we can contribute in a quality way.
- After repeating many such contributions, a skilled contributor will eventually get full commit rights.
- Mercurial is the source control tool, checkout and start contributing.
Can I create my own Java JDK?
Of course, you can create your own version of Java JDK by using OpenJDK as foundation and building on top of it or customizing it. Once such Java JDK is created, can I claim that to conform to the Java SE specification? Before that, you need to apply to Oracle for access to Java Test Compatibility Kit (TCK) and get your Java JDK tested for compatibility against the specification. For example, few companies that have got such access are The FreeBSD Foundation, Red Hat, SAP, Twitter for Java SE 8. The complete list is given in OpenJDK page and as of now there are only 9 companies listed for Java SE 8.
This page is collated from various sources in Internet and intended to be a tutorial to know how things happen, just behind the screens. I do not belong to Oracle and do not represent Java or Oracle in any strength, I am just yet another Tech blogger. If you are taking business or legal decisions, please refer the authoritative pages on Oracle’s site.
I never knew this. I use Ubuntu that means I’m using Open JDK??? Awesome … Very useful :)
thank you for this article
Hey, its really very helpful.
Thanks for such a nice information sharing.
Its great stuff to Joe. Thanks for collecting and feeding at one place for our easy dinner.
Hey, nice article.
Thankyou for this article, very helpful.
Thanks a lot for such nice stuffs!
Thank you for sharing the information. This is really helpful.
very nice explanation BRO