Are OpenJDK VM and Oracle Hotspot VM still two different JVMs?
I can't seem to find any somewhat official documentation on anything about OpenJDK VM. Even in OpenJDK homepage there is an HotSpot Group which develops HotSpot VM.
The HotSpot group is comprised of developers involved in the design, implementation, and maintanence of the HotSpot virtual machine
However if I check java -version on my Windows machine it prints out
Java HotSpot(TM) 64-Bit Server VM
But on my Ubuntu VPS
OpenJDK 64-Bit Server VM
If those are two different VMs what are the main differences between them? Do they have different runtime flag sets?
There's no real technical difference between the two, since the build process for Oracle JDK is based on that of OpenJDK. When it comes to performance, Oracle's is much better regarding responsiveness and JVM performance. It puts more focus on stability because of the importance it gives to its enterprise customers.
OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).
HotSpot is one component within both Oracle JDK and OpenJDK, as discussed above.
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.
The accepted Answer by apangin is now outdated.
For recent versions such as Java 11, the Oracle JDK product is virtually identical to the OpenJDK project. OpenJDK now includes Oracle's previous offerings: Java Flight Recorder, Java Mission Control, Application Class-Data Sharing, and ZGC.
To quote the Oracle.com blog:
From Java 11 forward, therefore, Oracle JDK builds and OpenJDK builds will be essentially identical.
Oracle has made dramatic changes in the last couple years.
Oracle declared their intention to converge their branded Oracle JDK with OpenJDK to feature-parity. Both are based on the OpenJDK code base.
Towards that end, the formerly commercial tools sold by Oracle, Flight Recorder and Mission Control are now open-sourced and donated to the OpenJDK project. See this and this on the OpenJDK site.
Oracle and other members of the OpenJDK consortium have contributed yet more source code to make the OpenJDK code base entirely open-source and unencumbered by licenses other than the GNU GPL+linking exception.
Oracle has changed their licensing terms. The Oracle JDK branded product is no longer free-of-cost for use in production. Alternatively, you can get a free-of-cost distribution of OpenJDK from any of over half a dozen vendors, including one from Oracle. For all the details, see this vital white paper written by pillars of the Java community, Java Is Still Free.
I drew this flowchart to guide you in selecting a JDK source.
Oracle reserves the right to patch their own branded product for an urgent fix or security vulnerability. But the company has stated their intention to also contribute and coordinate with the other OpenJDK members. Oracle continues to own the Java trademarks and to lead the future of the Java platform. For the existing Long-Term Support (LTS) versions 8 and 11, Oracle has ceded stewardship to RedHat (IBM).
The Question here asks:
Are OpenJDK VM and Oracle Hotspot VM still two different JVMs?
As discussed above, the two products are converging at feature parity. Regarding HotSpot technology, read on.
HotSpot is one component within both Oracle JDK and OpenJDK, as discussed above. Today’s HotSpot also combines parts from JRockit. Oracle merged the best of both Java engines, having acquired them from Sun Microsystems and BEA Systems.
The Adoptium project (formerly known as AdoptOpenJDK) from the Eclipse Foundation also provides a build of OpenJDK using Eclipse OpenJ9 (based on J9, donated by IBM) as an alternative to HotSpot. When downloading from Adoptium web site, you choose either HotSpot or OpenJ9 from a menu.
Currently, tests seem to show OpenJ9 as dramatically faster to launch while using much less memory, but HotSpot may run faster with sustained usage. But this is still early days for OpenJ9, so investigate for yourself the latest developments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With