Amazon Corretto JVM

14 Nov, 2018
Xebia Background Header Wave

The Oracle Java Virtual Machine (JVM) is a popular runtime for the Java programming language. The runtime is available in two versions, an Open Source variant called OpenJDK, and a commercial version which is called Oracle JDK. In 2018, Oracle has announced that, effective January 2019, Java SE 8 public updates will no longer be available for ‘Business, Commercial or Production use’ without a commercial license. Java SE 9 as well as Java SE 8 is free and available for redistribution for general purpose computing. Java SE continues to be available under the Oracle Binary Code License (BCL) free of charge.
In november 2018, AWS introduced Amazon Corretto, a No-Cost Distribution of OpenJDK with Long-Term Support. Amazon Corretto, named after an Italian beverage, is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto comes with long-term support that will include performance enhancements and security fixes. Amazon Corretto is availble for Linux, Windows, macOS and Docker. Lets take a look!


We will look at the Docker distribution of Corretto. First we have to create a Docker image:

$ docker build -t amazon-corretto-8

Run the container:

$ docker run -it amazon-corretto-8

Run a small application:

bash-4.2# java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-amazon-corretto-preview-b12)
OpenJDK 64-Bit Server VM (build 25.192-b12, mixed mode)

$ vi

public class HelloWorld {
        public static void main(String[] args) {
                System.out.println("Hello World!");

bash-4.2# java HelloWorld
Hello World!


Amazon has provided a free LTS distribution of OpenJDK that is available for Linux, Windows, macOS and Docker called Corretto. Corretto is supported and maintained by AWS and is a viable alternative to OpenJDK for production workloads on the JVM.


Get in touch with us to learn more about the subject and related solutions

Explore related posts