Supported tags and respective
Where to report problems:
Supported architectures: (more info)
The images in this repository contain OpenJDK binaries that are built with Eclipse OpenJ9.
Eclipse OpenJ9 is a high performance, scalable, Java™ virtual machine (JVM) implementation that has a proven track record of running Java applications in production environments. Contributed to the Eclipse project by IBM, the OpenJ9 JVM underpins the IBM SDK, Java Technology Edition product that is a core component of many IBM Enterprise software products. Continued development of OpenJ9 at the Eclipse foundation ensures wider collaboration, fresh innovation, and the opportunity to influence the development of OpenJ9 for the next generation of Java applications.
OpenJDK binaries that include Eclipse OpenJ9 are available through AdoptOpenJDK.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Are the builds TCK Certified ?
This page has more information on which images are TCK certified.
OpenJ9 has multi-arch support so the same commands work on all supported architectures.
How to use this Image
To run a pre-built jar file with the latest Java 8 OpenJDK image, use the following commands:
FROM adoptopenjdk/openjdk8-openj9:latest RUN mkdir /opt/app COPY japp.jar /opt/app CMD ["java", "-jar", "/opt/app/japp.jar"]
To do the same with the Java 9 OpenJDK image, use the following commands:
FROM adoptopenjdk/openjdk9-openj9:latest RUN mkdir /opt/app COPY japp.jar /opt/app CMD ["java", "-jar", "/opt/app/japp.jar"]
You can build and run the Docker image as shown in the following example:
$ docker build -t japp . $ docker run -it --rm japp
To get a specific version of a docker image, add the build number as shown in the following example:
$ docker run adoptopenjdk/openjdk8-openj9:jdk8u152-b16 java -version openjdk version "1.8.0-internal" OpenJDK Runtime Environment (build 1.8.0-internal-jenkins_2018_01_30_13_02-b00) Eclipse OpenJ9 VM (build 2.9, JRE 1.8.0 Linux amd64-64 Compressed References 20180130_57 (JIT enabled, AOT enabled) OpenJ9 - 8f03f71 OMR - f410d65 JCL - 687ce89 based on jdk8u152-b16)
Using the Class Data Sharing feature
Eclipse OpenJ9 provides a feature called Class data sharing. This mechanism offers transparent and dynamic sharing of data between multiple Java virtual machines (JVMs) running on the same host, which reduces the amount of physical memory consumed by each JVM instance. By providing partially verified classes and possibly pre-loaded classes in memory, this mechanism also improves the start up time of the JVM.
To enable class data sharing between JVMs that are running in different containers on the same host, a common location must be shared between containers. This requirement can be satisfied through the host or a data volume container. When enabled, class data sharing creates a named "class cache", which is a memory-mapped file, at the common location. This feature is enabled by passing the
-Xshareclasses option to the JVM as shown in the following Dockerfile example:
FROM adoptopenjdk/openjdk8-openj9:latest RUN mkdir /opt/shareclasses RUN mkdir /opt/app COPY japp.jar /opt/app CMD ["java", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app/japp.jar"]
cacheDir sub-option specifies the location of the class cache. For example
/opt/sharedclasses. When sharing through the host, a host path must be mounted onto the container at the location the JVM expects to find the class cache. For example:
docker build -t japp . docker run -it -v /path/on/host/shareclasses/dir:/opt/shareclasses japp
When sharing through a data volume container, create a named data volume container that shares a volume. For example:
docker create -v /opt/shareclasses --name classcache japp /bin/true
Then, start your JVM container by using the
--volumes-from flag to mount the shared volume, as shown in the following example:
docker run -it --volumes-from classcache japp
The Dockerfiles and associated scripts are licensed under the Apache License, Version 2.0.
Licenses for the products installed within the images:
- Eclipse OpenJ9 + OpenJDK: The combined works license is GNU GPL v2 with Classpath Exception.
As with all Docker images, other software is likely to be included, which might be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.