Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between Oracle JDK and OpenJDK

NOTE: This question is from 2014. As of Java 11 OpenJDK and Oracle JDK are converging.

Are there any crucial differences between Oracle and OpenJDK?

For example, are the garbage collection and other JVM parameters the same?

Does GC work differently between the two?

like image 920
user1340582 Avatar asked Mar 12 '14 16:03

user1340582


People also ask

Is OpenJDK fully compatible with Oracle JDK?

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.

Can OpenJDK replace Oracle JDK?

Oracle JDK 11 and OpenJDK 11 will be interchangeable. There are some differences between Oracle JDK 1.8 and OpenJDK 1.8, although the gap is shrinking.

Is OpenJDK slower than Oracle?

Oracle JDK has good GC options and better renderers whereas OpenJDK has fewer GC options and has slower graphics renderer options because of its distribution which contains own renderers. Oracle JDK provides much better performance compared to the OpenJDK in terms of responsiveness and JVM performance.

What is the difference between JVM JDK JRE & OpenJDK?

The JRE does not contain tools and utilities such as compilers or debuggers for developing applets and applications. The JDK is a superset of the JRE, and contains everything that is in the JRE, plus tools such as the compilers and debuggers necessary for developing applets and applications.


1 Answers

Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.

OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).

Most of the vendors of JDK are written on top of OpenJDK by doing a few tweaks to [mostly to replace licensed proprietary parts / replace with more high-performance items that only work on specific OS] components without breaking the TCK compatibility.

Many vendors implemented the Java specification and got TCK passed. For example, IBM J9, Azul Zulu, Azul Zing, and Oracle JDK.

Almost every existing JDK is derived from OpenJDK.

As suggested by many, licensing is a change between JDKs.

Starting with JDK 11 accessing the long time support Oracle JDK/Java SE will now require a commercial license. You should now pay attention to which JDK you're installing as Oracle JDK without subscription could stop working. source

Ref: List of Java virtual machines

like image 104
Venkateswara Rao Avatar answered Sep 28 '22 15:09

Venkateswara Rao