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.
- Author:
- Christian Hujer, Software Crafter and CEO / CTO of Nelkinda Software Craft Private Limited
- First Published:
- by
Nelkinda Software Craft Private Limited
- Last Modified:
- by Christian Hujer
- Approximate reading time:

1 Downloads
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 0a1 > BUILD_TYPE="commercial" 7c8 < SOURCE=".:hg:b67884871b5f" --- > SOURCE=".:hg:620af027f493 open:hg:b67884871b5f"
release
files of OpenJDK 12 and Oracle JDK 123 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
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:
javax.crypto.JarVerifier
jdk.internal.util.EnvUtils
jdk.internal.vm.PostVMInitHook
sun.usagetracker.UsageTrackerClient
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:
java.base
(man1/java.1
,man1/keytool.1
)java.rmi
(man1/rmid.1
,man1/rmiregistry.1
)java.scripting
(man1/jrunscript.1
)java.security.jgss
(man1/kinit.1
,man1/klist.1
,man1/ktab.1
)jdk.accessibility
(man1/jaccessinspector.1
,man1/jaccesswalker.1
)jdk.compiler
(man1/javac.1
,man1/serialver.1
)jdk.hotspot.agent
(man1/jhsdb.1
)jdk.jartool
(man1/jar.1
,man1/jarsigner.1
)jdk.javadoc
(man1/javadoc.1
)jdk.jcmd
(man1/jcmd.1
,man1/jinfo.1
,man1/jmap.1
,man1/jps.1
,man1/jstack.1
,man1/jstat.1
)jdk.jconsole
(man1/jconsole.1
)jdk.jdeps
(man1/javap.1
,man1/jdeprscan.1
,man1/jdeps.1
)jdk.jdi
(man1/jdb.1
)jdk.jlink
(man1/jlink.1
,man1/jmod.1
)jdk.jshell
(man1/jshell.1
)jdk.jstatd
(man1/jstatd.1
)jdk.pack
(man1/pack200.1
,man1/unpack200.1
)jdk.rmic
(man1/rmic.1
)jdk.scripting.nashorn.shell
(man1/jis.1
)
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.