1

The AdoptOpenJDK project seems to ship JDKs bundled with HotSpot JVM (as one possible option). But what is its relationship with OpenJDK then?


I understand the word OpenJDK can be ambiguous. Here I am referring to (quoted from Wikipedia)

a free and open-source implementation of the Java Platform, Standard Edition (Java SE).

which I think already contains a JVM.

wlnirvana
  • 1,237
  • 10
  • 25
  • 3
    "_AdoptOpenJDK uses infrastructure, build and test scripts to produce prebuilt binaries from OpenJDK™ class libraries and a choice of either the OpenJDK HotSpot or Eclipse OpenJ9 VM_" – https://adoptopenjdk.net/ – Slaw Oct 28 '19 at 10:07
  • 3
    I'm voting to close this question as off-topic because it is not a question about programming, but rather, a question about third-party projects and their relationship to each other. – RealSkeptic Oct 28 '19 at 10:10
  • Well, different JVM implementations still need to follow the spec so you can choose any that fits your needs. The difference often lies in implementation details like how the JIT compiler or garbage collectors operate or different runtime options. Any JVM that passes the TCK verification should be able to run any Java program so you're free to choose what fits your needs or platform best - and AdoptOpenJDK just provides that choice. – Thomas Oct 28 '19 at 10:16
  • @Slaw That all makes sense now. I thought HotSpot refers to the Oracle HotSpot JVM exclusively. I would be happy to mark this post as accepted if you can summarize your comment in an answer. Besides, would you mind elaborate on which part of OpenJDK code is used (I guess primarily javac and rt.jar?) when the OpenJ9 JVM is chosen? – wlnirvana Oct 28 '19 at 12:07
  • @RealSkeptic what about the linked question in the post? Also the sample question "Do Swift-based applications work on OS X 10.9/iOS 7 and lower?" at https://stackoverflow.com/tour – wlnirvana Oct 28 '19 at 12:11
  • I am not too happy about the linked question, but apparently, it provides value for programming because it asks for comparison between two environment, the answers to which may well be relevant for *development* of code. However, the relation of two projects is a legal question that has little to bear on programming. – RealSkeptic Oct 28 '19 at 12:18
  • Related: [*Difference between JVM and HotSpot?*](https://stackoverflow.com/q/16568253/642706) and [*Differences between Oracle JDK and OpenJDK*](https://stackoverflow.com/q/22358071/642706). – Basil Bourque Dec 12 '19 at 07:31
  • Also related: [*Difference between OpenJDK and AdoptOpenJDK*](https://stackoverflow.com/q/52431764/642706). – Basil Bourque Jun 24 '20 at 06:06
  • Update: *AdoptOpenJDK* has changed its name to *Adoptium*, as part of its [move to the Eclipse Foundation](https://blog.adoptopenjdk.net/2020/06/adoptopenjdk-to-join-the-eclipse-foundation/). – Basil Bourque Jun 24 '20 at 06:06

1 Answers1

4

Update: AdoptOpenJDK has changed its name to Adoptium, as part of its move to the Eclipse Foundation.


OpenJDK provides complete source code for a full implementation of the Java Platform as defined in the Java Specifications, JSRs, and JEPs. An implementation of the Java platform includes many things, among them:

An implementation of Java has the option of providing a Just-In-Time (JIT) compiler/optimizer as part of the JVM. The OpenJDK project includes source code for the HotSpot JIT.

People providing builds or installers for the Java Platform are free to use HotSpot or to choose another JIT compiler technology. OpenJ9 in one such alternative JIT, developed at IBM, now open-sourced through the Eclipse Foundation, and provided free-of-charge. In the past, another alternative JIT was JRockit, owned by Oracle. Parts of JRockit have been merged into the current version of HotSpot.

Diagram showing the evolution of JIT options in the JVM, with older HotSpot merging with JRockit to produce modern OpenJDK HotSpot, and the alternative J9 being open-sourced as OpenJ9.

The AdoptOpenJDK project offers you choice of either the HotSpot engine provided by Oracle via the OpenJDK project or the alternative OpenJ9 engine provided by the Eclipse Foundation.

With either choice you get the same class libraries from OpenJDK codebase, the same tools including Mission Control and Flight Recorder from OpenJDK, and the same utilities from OpenJDK. Only the JIT/JVM is different whether you choose HotSpot or OpenJ9.

Screenshot of download page at AdoptOpenJDK offering you a choice either HotSpot JIT or OpenJ9 JIT.

AdoptOpenJDK is only one of several vendors providing distributions of Java techonology as binaries/installers. Most of these are based mostly, if not entirely, on the OpenJDK project’s source code releases. Here is a flowchart showing you the various vendors.

Flowchart guiding you in choosing a vendor for a Java 11 implementation

And here is a list of possible motivations to consider in selecting a vendor.

Motivations in choosing a vendor for Java

Basil Bourque
  • 218,480
  • 72
  • 657
  • 915
  • Thanks for the very clear answer. So AdopOpenJDK may actually adopt no only (the library) part of OpenJDK, but (the JVM) part of OpenJ9. Is that correct? – wlnirvana Dec 13 '19 at 05:16