Andrea Danti - Fotolia

Tip

Decide if Amazon Corretto is the best fit for Java devs on AWS

AWS plans to support Java developers with Corretto, its OpenJDK distribution with longer free support than what Oracle offers. Decide if it's the right fit for your AWS workloads.

AWS has stepped into the Java arena -- as Oracle has taken one step out -- with Amazon Corretto, a no-cost, multi-platform, production-grade distribution of OpenJDK based on Java SE.

Java stands out for its use in mobile and highly distributed applications, such as Android smartphone apps, as well as edge and IoT devices. It has built a reputation for portability -- Java runs on almost any server or client that hosts a Java virtual machine (JVM) -- and is known for being robust and relatively secure in the ways that it references and moves data within a program.

How Corretto fits into the JDK space

A Java Development Kit (JDK) is a platform developers can use to create and test software written in Java. The JDK development environment includes the Java Runtime Environment (JRE) and JVM, along with various tools to load, compile and archive Java code.

Amazon Corretto enters a crowded JDK space. There are various JDKs designed to support different workload goals and platforms, such as Windows, Linux and Solaris. OracleJDK remains the most widely recognized Java Platform, Standard Edition (Java SE) platform. Oracle, along with other industry leaders, contributes to OpenJDK, Java's open source version of the JDK. Other JDKs include AdoptOpenJDK, Azul Zulu and Red Hat's OpenJDK built with Red Hat Enterprise Linux.

Recently added by AWS, Corretto supports a variety of Linux, Windows and macOS platforms. There is also an official Docker image for Corretto and experimental support for AArch64 architecture.

Although Amazon Corretto has similar capabilities and features to other JDKs, AWS built Corretto as a drop-in replacement for all Java SE distributions, unless developers employ specialized features not currently available in OpenJDK, such as Java Flight Recorder.

When developers install and point to Amazon Corretto, any previous command-line options, parameters or monitoring behaviors continue to work without modification. Amazon Corretto is used internally at AWS, and therefore, AWS has patched the distribution for security and performance in ways that some OpenJDKs have not been.

How to use Corretto

To get started with Amazon Corretto, select the desired version of the implementation directly from the Corretto webpage. Then, choose the specific platform and package type, either JDK or JRE, for download.

Developers can choose between Corretto 8 or Corretto 11. The Corretto 8 JDK is available for Amazon Linux 2 x64, Amazon Linux 2 AArch 64 (experimental), Linux x64, Windows x64, Windows x86 and macOS x64. The Corretto 11 JDK is available for Linux x64, Windows x64 and macOS x64.

Amazon documentation outlines the detailed instructions for installing and uninstalling each version of Corretto, but the process is typically straightforward. For example, to install for Windows, obtain the MSI file download, launch the MSI file and follow the installation wizard. Then, set an installation path if desired, set the JAVA_HOME and PATH environment variables and then verify the installation by running java –version in a command prompt. If the installation is correct, users should see the OpenJDK version, Corretto build version and platform build version as three separate entries in the output.

Once it's installed, Amazon Corretto is ready to use without any additional preparation. Developers can follow updates on the list of patches for the Corretto version they've chosen.

Oracle ends support

So, why do developers need another distribution of OpenJDK? It's a matter of support.

Amazon Corretto is a response to significant changes to how Oracle will support Java 8 and Java 11. Oracle made several support changes that went into effect in 2019.

In late 2018, Oracle said it would no longer provide free updates and security patches for Java 8 where it is used in production; users would need to pay Oracle for support. Perhaps even more significantly, Oracle announced that Java 11 JVM could not be used for any production purposes without licensing. When you consider the broad scope and adoption of Oracle Java platforms, this profoundly impacts licensing and core technologies.

Although OpenJDK will remain free and can be used in production, Oracle is only committed to support and update Oracle Java 11 OpenJDK for six months after release. All subsequent support and updates are relegated to the open source community.

Amazon Corretto objectives

With the release of Amazon Corretto, AWS hopes to display continued support for the Java developer base. AWS promises long-term support of both version 8 and version 11 to 2023 and 2024, respectively. Considering the extent of Amazon's influence and internal use of Corretto, AWS hopes Java developers will gravitate to Corretto as a reasonable step forward.

Dig Deeper on AWS cloud development