Skip to content

Differences between SapMachine and OpenJDK

Johannes Bechberger edited this page Oct 24, 2024 · 9 revisions

Differences between SapMachine and OpenJDK

It is the goal of the SapMachine team to keep SapMachine as close to OpenJDK as possible. Therefore features identified as required by SAP applications should be developed in and contributed to OpenJDK. Only if this is, for what ever reason, not possible, differences between SapMachine and OpenJDK are considered acceptable. However, they have to be kept as small as possible.

Features not accepted via the OpenJDK reviewing process may still find their way into OpenJDK code when switched off by default. It is generally considered acceptable to switch on such features by default in SapMachine.

Features which require functional changes in the code may still be acceptable. However, this will have to be decided for each particular case.

Additionally Included Software

We started including async-profiler in our distribution.

Version numbers

You can easily identify SapMachine from the output of the java -version command (see below). Although the version information of SapMachine and OpenJDK/OracleJDK are slightly different, the SapMachine version output still fully conforms to the format specified in the JEP 322: Time-Based Release Versioning and JEP 223: New Version-String Scheme.

SapMachine version information

$ ./sapmachine-11/bin/java -version
openjdk version "11.0.2" 2019-01-16 LTS
OpenJDK Runtime Environment (build 11.0.2+0-LTS-sapmachine)
OpenJDK 64-Bit Server VM (build 11.0.2+0-LTS-sapmachine, mixed mode)

In addition to the original OpenJDK version output (see below), SapMachine adds an optional part (i.e. LTS-sapmachine) to the version number. This optional part (defined as optional build information in JEP 322) starts with LTS for long term support releases followed by the name sapmachine. If we will do an additional SapMachine specific release for this version, the fifth element of the version number will be increased and looks as follows 11.0.2.0.1+0-LTS-sapmachine. Once we pull and merge the next upstream release, this number will be reset to zero (e.g. 11.0.3+0-LTS-sapmachine). We are currently not using the build number part of the version string and always set it to 0.

The version date, as defined in JEP 322, will be set to the date, the SapMachine is generally available (GA). This date is never before the OpenJDK GA but may be set to a date after the OpenJDK GA.

OpenJDK version information

$ ./jdk-11-openjdk/bin/java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

System properties

The following listing shows the differences in the Java system properties between SapMachine and OpenJDK. Besides the version differences already discussed above that's mostly the different values for the various vendor properties:

-    java.runtime.version = 11.0.2+9
+    java.runtime.version = 11.0.2+0-LTS-sapmachine
-    java.vendor = Oracle Corporation
-    java.vendor.url = http://java.oracle.com/
-    java.vendor.url.bug = http://bugreport.java.com/bugreport/
-    java.vendor.version = 18.9
+    java.vendor = SAP SE
+    java.vendor.url = https://sapmachine.io
+    java.vendor.url.bug = https://github.com/SAP/SapMachine/issues/new
-    java.version.date = 2019-01-15
+    java.version.date = 2019-01-16
-    java.vm.vendor = Oracle Corporation
-    java.vm.version = 11.0.2+9
+    java.vm.vendor = SAP SE
+    java.vm.version = 11.0.2+0-LTS-sapmachine

Other behavioral differences