Comparing OpenJDK 12 and Oracle JDK 12

I compared OpenJDK 12 and Oracle JDK 12. TL;DR: There is no relevant difference other than the license.

Christian Hujer, Software Crafter and CEO / CTO of Nelkinda Software Craft Private Limited
First Published:
by NNelkinda Software Craft Private Limited
Last Modified:
by Christian Hujer
Approximate reading time:
Figure -1: Comparing the file trees of OpenJDK 12 and Oracle JDK 12


The downloads for OpenJDK 12 and Oracle JDK 12 can be found at [OpenJDK12Download] and [OracleJDK12Download].

2 Source Baseline

The OpenJDK 12 and Oracle JDK 12 are based on the same commit b67884871b5f in Mercurial. This can be seen by looking at the differences between the two implementation's release files:

christian.hujer@Nelkinda-Blade-Stealth-2:/opt$ diff openjdk-12/release oracle-jdk-12/release
> BUILD_TYPE="commercial"
< SOURCE=".:hg:b67884871b5f"
> SOURCE=".:hg:620af027f493 open:hg:b67884871b5f"
Listing 2-1: Comparing the release files of OpenJDK 12 and Oracle JDK 12

3 Man Pages

OpenJDK 12 does not come with man-pages. That's weird, and this must be a bug in OpenJDK.

4 Legal

The legal files differ, obviously, because of the different license terms and conditions.

5 Header Files

The technical contents of the header files in the include/ directory are identical. The header files differ in the license terms. The header files in OpenJDK are GPL2, the header files in Oracle JDK refer to the proprietary license.

6 Module Differences

OpenJDK 12 and Oracle JDK 12 contain exactly the same list of modules. The modules themselves are almost identical.

christian.hujer@Nelkinda-Blade-Stealth-2:/opt$ for i in openjdk-12/jmods/*.jmod ; do mod=$(basename $i) ; echo $mod ; diff -I 'legal.*' <(jar tf openjdk-12/jmods/$mod | sort) <(jar tf oracle-jdk-12/jmods/$mod | sort) ; echo ; done
Listing 6-1: Comparing the modules of OpenJDK 12 and Oracle JDK 12

6.1 Modules with different classes: java.base

The java.base module of Oracle JDK 12 contains a few classes which are not part of OpenJDK 12:

Without verification, I would assume that these classes, especially sun.usagetracker.UsageTrackerClient, are related to verifying the subscription for the Oracle JDK.

6.2 Modules with Man Pages

Some modules contain man pages, which are only present in Oracle JDK 12:

There might be differences which are one level deeper than the level that I've analyzed so far. For example, some classes might have symbols which are present in only one of the JDKs and not the other.

7 Conclusion

The announcement that OpenJDK and Oracle JDK are converging turns out to be true. Other than the license, I could not find any significant differences between OpenJDK 12 and Oracle JDK 12.