Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Technical difference between AdoptOpenJDK and Red Hat OpenJDK for Windows

Red hat provides the Red Hat OpenJDK 8 for Windows for development use only (registration required). AdoptOpenJDK provides OpenJDK 8 builds for Windows (AdoptOpenJDK 8 Windows) without any restrictions.

Is there any technical difference between the two packages when using the same version/update(e.g. 8u181)? With "technical difference" I mean missing classes/functions, different default JVM settings, etc.

like image 689
derkoe Avatar asked Sep 06 '18 11:09

derkoe


People also ask

What is the difference between AdoptOpenJDK and OpenJDK?

Adoptium/AdoptOpenJDK ➙ builds. The first provides source-code, the other provides builds of that source-code. OpenJDK is an open-source project providing source-code (not builds) of an implementation of the Java platform as defined by: the Java Specifications.

Is AdoptOpenJDK deprecated?

This image is officially deprecated in favor of the eclipse-temurin image, and will receive no further updates after 2021-08-01 (Aug 01, 2021).

What is AdoptOpenJDK?

AdoptOpenJDK is an open, community-led initiative that provides free, pre-built binaries of the reference implementation of the Java platform from OpenJDK. The AdoptOpenJDK community's goal is to ensure that these regularly updated downloads of Java are available for everyone all the time.

Does Red Hat support OpenJDK?

All Red Hat distributions of OpenJDK are supported for development and production for all Java workloads, giving you the confidence to develop, test, and deploy in Windows or Linux-based environments. The JRE2 and JDK distributions are made available via rpm and zip files.


2 Answers

Red Hat provides OpenJDK 8 Windows binaries under exactly the same license as AdoptOpenJDK and any other open-source OpenJDK 8 build - under the GNU GPL v. 2 with classpath exception. All the restrictions about the "development use" are related only to the subscription (support) that can be purchased from Red Hat.

Technical differences between Red Hat OpenJDK 8 for Windows and other mentioned builds are pretty minor, as all these builds pass TCK. Generally Red Hat builds are trying to stay as close as possible in behaviour to OpenJDK 8 package that is included in RHEL and CentOS.

Differences:

  1. RH OpenJDK 8 build is done from the sources of OpenJDK RPM package that is used on RHEL/CentOS. These sources are generally very close to upstream sources, but contain some changes (see points below) and may include some bugfixes (RPM patches) ahead of time. RHEL/CentOS changes can be tracked in a publicly-available repo for CentOS RPM

  2. RH OpenJDK 8 includes Shenandoah garbage collector

  3. RH OpenJDK 8 uses sources from RHEL/CentOS for dependency libraries (zlib, giflib, libjpeg-turbo, libpng, nss (nss is not used anymore)) instead of the (partial) sources of these libraries that are included in-tree in upstream jdk sources

  4. Elliptic Crypto implementation in RH OpenJDK 8 includes only 3 most popular elliptic curves - NIST P-256, NIST P-384 and NIST P-521.

  5. RH OpenJDK 8 uses the set of root CA certificates from RHEL/CentOS

  6. RH OpenJDK 8 may use slightly newer timezone data - it is taken from RHEL/CentOS

  7. RH OpenJDK 8 includes all Java sources code inside the src.zip file (that is used by IDEs to allow browsing jdk code), in upstream build substantial part of these sources is not included

  8. RH OpenJDK 8 does not include demos and samples

  9. RH OpenJDK 8 includes a set of font files

  10. all native binaries in RH OpenJDK 8 are signed by RH certificate

  11. RH OpenJDK 8 installer includes a JavaFX implementation

  12. RH OpenJDK 8 installer includes a WebStart implementation

Source: I work on OpenJDK Windows builds at RH.

like image 183
alexkasko Avatar answered Oct 09 '22 10:10

alexkasko


The main difference in AdoptOpenJDK I found is that you can choose from 2 different VM implementations, either the HotSpot which I found has similar slow performance than Oracle's implementation or the much more efficient Eclipse Open J9 jvm implementation which is based on former IBM SDK 8 which is now open sourced. To confirm I have an Eclipse Maven project which compiles slow in Oracle's JVM implementation.

  1. AdoptOpenJDK Eclipse Open J9 - 1 minute
  2. IBM SDK 8 (commercial license) - 1 minute
  3. AdoptOpenJDK OpenJDK8 with HotSpot - 7 minutes
  4. Oracle Java HotSpot(TM) (build 1.8.0_181-b13) - 11 minutes

So I think open sourcing Oracle's JVM gave some better results than Oracle's commercial JVM, however open sourcing IBM's JDK with Open J9 is much better and performance is 1 order of magnitude faster in compilation time (for my project).

like image 44
Gabriel Hernandez Avatar answered Oct 09 '22 11:10

Gabriel Hernandez