DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Java
  4. Amazon Corretto: Another OpenJDK

Amazon Corretto: Another OpenJDK

Check out the latest, no-cost JDK from Amazon.

Maheshwar Ligade user avatar by
Maheshwar Ligade
CORE ·
Jan. 03, 19 · News
Like (38)
Save
Tweet
Share
61.07K Views

Join the DZone community and get the full member experience.

Join For Free

Amazon Corretto, a no-cost distribution of the OpenJDK, is the new OpenJDK distribution from Amazon.

This is really great news for Java developers. Amazon has released blog post with the following text that explains their reasoning for releasing Corretto:

“Amazon has a long and deep history with Java. I’m thrilled to see the work of our internal mission-critical Java team being made available to the rest of the world” — James Gosling

Amazon Corretto is a no cost, multiplatform, production-ready open JDK distribution. It comes with long-term support, including performance enhancements and security fixes. Amazon is using Corretto internally in production on thousands of services. This means that it has been fully tested. Corretto is certified as compatible with the Java SE standard and is used internally at Amazon for many production services. With Corretto, you can develop and run Java applications on operating systems, such as Amazon Linux 2, Windows, and macOS. In response to AWS Linux’s long-term support for Java, AWS recently released the free OpenJDK Amazon Corretto to ensure that cloud users can get stable support and secure the operation of Java workloads. To ensure compatibility, Arun Gupta, AWS’s chief open-source technologist, said that every time Amazon Corretto is released, the development team will implement the TCK (Technology Compatibility Kit) to ensure that the component is compatible with the Java SE platform.

On Twitter, Gupta said that the workload of Amazon’s internal formal environment also relies heavily on Amazon Corretto’s JDK to meet high performance and large-scale demand. Amazon Corretto can support multiple heterogeneous environments, including the cloud, local data centers, and user development environments. In addition, to expand the scope of application of developers, the platform supported by Amazon Corretto at this stage includes Amazon Linux 2, Windows, macOS, and Docker image files. The official version of Amazon Corretto is expected to be released in the first quarter of 2019 and will be compatible with Ubuntu and Red Hat Enterprise Linux.

The JDK is now available for free download by open users, and AWS also promises that Amazon Corretto version 8 free security updates will be available at least until June 2023, while Amazon Corretto version 11 free updates will continue until August 2024.

This is just a developer preview release if you are a developer go ahead and make your hands dirty with this one.

Benefits

  • Backed by Amazon
  • Production-ready
  • Multiplatform Support: Linux, Windows, Osx, and Docker containers
  • No cost

You can find the source code for Corretto on GitHub. Additionally, you can find the Official Documentation here and download the preview link.

How to Install on macOS

The following applies to Mac operating system versions 10.10 or later. You must have administrator privileges to install and uninstall Amazon Corretto 8.

Download amazon-corretto-jdk-8u192-macosx-x64.pkg.

  1. Double-click the downloaded file to start the installation wizard. Follow the steps in the wizard. Once the wizard completes, the Corretto 8 Preview will be installed in /Library/Java/JavaVirtualMachines/.
  2. To get the complete installation path, run the following command in a terminal:
/usr/libexec/java_home — verbose


4. Set the JAVA_HOME variable.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home


And enjoy coding!

How to Install for Docker

Build a Docker image with Amazon Corretto 8:

docker build -t amazon-corretto-jdk-8 github.com/corretto/corretto-8-docker


Your Docker image is ready and the name is amazon-corretto-jdk-8. Run it using the following command:

docker run -it amazon-corretto-jdk-8


If you want to develop a Java application and use Amazon Corretto as a parent image, then follow the script below.

Let us create a Hello World Java app with Amazon Corretto. First, create a Dockerfile with the following content.

FROM amazon-corretto-8 RUN
echo $’ \
public class Hello { \
public static void main(String[] args) { \
System.out.println(“Welcome to Amazon Corretto 8!”);
\ }
\ }’ > Hello.java
RUN javac Hello.java
CMD [“java”, “Hello”]


2. Build the image

docker build -t hello-app .


3. Run the image

docker run hello-app


That's all for now! Let us know what you think about Amazon Corretto in the comments section.

OpenJDK Docker (software) Java (programming language) operating system

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Boot vs Eclipse MicroProfile: Resident Set Size (RSS) and Time to First Request (TFR) Comparative
  • What Are the Benefits of Java Module With Example
  • Real-Time Analytics for IoT
  • How We Solved an OOM Issue in TiDB with GOMEMLIMIT

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: