At Devoxx BE, held in Antwerp, Belgium, Amazon announced a preview release of Amazon Corretto, a "no-cost, multiplatform, production-ready distribution" build of OpenJDK, the reference implementation of Java. During the opening keynote James Gosling, the founder of the Java language, announced Corretto as a drop-in replacement for all Java SE distributions, with the exception of use cases involving features that are not available in OpenJDK (e.g., Java Flight Recorder) or workloads currently being run on non-HotSpot JVMs. Amazon plans for Corretto to become the default OpenJDK on Amazon Linux 2 in 2019.
The preview release version of Corretto 8 corresponds to Java 8, and installation binaries are currently available for Amazon Linux, macOS, and Windows. The GA release is planned for the first quarter of 2019, and will also add support for Ubuntu and Red Hat Enterprise Linux. Amazon will provide free security updates for Corretto 8 until at least June 2023. Corretto 11, corresponding to OpenJDK 11, will be available during the first half of 2019. Amazon will support Corretto 11 with quarterly updates until at least August 2024.
The announcement post on the AWS Open Source blog by Arun Gupta, principal open source technologist at Amazon Web Services, stated that Java is one of the most popular languages in use by AWS customers, and that Amazon is committed to supporting Java and keeping it free.
We're making [this] available to customers with no-cost, long-term support, with quarterly updates including bug fixes and security patches. AWS will also provide urgent fixes to customers outside of the quarterly schedule.
After the recent announcements of changes to Oracle's Java support offering -- principally removing free long term support (LTS) for Java -- many Amazon customers have become concerned that they would have to pay for an LTS version of Java in order to run their workloads. Initially Amazon re-affirmed LTS for Java in Amazon Linux, and this has now been followed up with the preview release of Amazon Corretto.
At an additional breakout session at Devoxx BE, Gupta was joined by Yishai Galatzer, manager for the JDK team at AWS. The pair discussed that Corretto 8 includes targeted backports from newer OpenJDK releases, as well as newly-developed enhancements from the associated community and Amazon itself. The release process includes testing on thousands of Amazon production services, which makes it possible for fixes to be released within days of finding issues. Amazon also runs the Java Technology Compatibility Kit (TCK) on each Corretto release to ensure compatibility with the Java SE platform.
The additional patches and improvements that are included within the Corretto build which are outside of the current OpenJDK upstream code base enable Amazon to "address high-scale, real-world service concerns, meeting heavy performance and scalability demands". Example of these patches include: [C8-1] Prevent premature OutOfMemoryException when G1 GC invocation is suspended by a long-running native call; [C8-2] Back port from OpenJDK 10, fixing JDK-8177809: "File.lastModified() is losing milliseconds (always ends in 000)"; and [C8-17] Improve portability of JVM source code when using gcc7.
Amazon has already made several recent contributions to OpenJDK, and Gupta's blog post states that "we look forward to working closely with the OpenJDK community on future enhancements to OpenJDK 8 and 11". He continues, "we downstream fixes made in OpenJDK, add enhancements based on our own experience and needs, and then produce Corretto builds." This does, however, raise the possibility for potential subtle differences within the upstream OpenJDK repo and Corretto.
In the case that any upstreaming efforts for such patches is not successful, delayed, or not appropriate for OpenJDK project, we will provide them to our customers for as long as they add value. If an issue is solved a different way in OpenJDK, we will move to that solution as soon as it is safe to do so.
Once Corretto binaries are installed on a host and correctly invoked to run Java applications, the "existing command-line options, tuning parameters, monitoring, and anything else in place will continue to work as before". However, this does assume execution of an application via the HotSpot JVM, and if an alternative JVM is being currently being used, for example Eclipse OpenJ9, then the command line options that are available via this JVM may be incompatible or require modification. Audience members at Devoxx asked about the possibility of support for other JVMs in future versions of the platform, but Galatzer stated that at this time only HotSpot will be bundled with Corretto.
The source code for Corretto is available via GitHub, and InfoQ reached out to Gupta to ask if the project would be open to pull requests and patches from the wider community.
Yes. Corretto-specific pull requests can be sent at https://github.com/corretto. Any OpenJDK related issue would need to be filed in the corresponding OpenJDK repository under the OpenJDK contributor agreement, so the whole community can benefit from the fix. After such a contribution has been submitted to OpenJDK, we recommend discussing with the Corretto team over an issue, and deciding if a PR on Corretto will help accelerate the inclusion of a fix.
He was also keen to point out the public process for filing bugs on Corretto and OpenJDK:
OpenJDK related bugs should be filed in the OpenJDK repositories, a link to that bug could be filed on Corretto as well. This is to make any code or idea filed on the bug available for the whole community. If there are issues related to build scripts, docs and other artifacts only relevant to Corretto, then they should be filed in the appropriate repo at https://github.com/corretto.
Discussions of the announcement on HackerNews and via Twitter, for example, Stephen Colebourne, Java Champion and creator of Joda-Time, have frequently focused on what the release cadence of Corretto versions will be. Gupta confirmed that currently only versions of Corretto that correspond to LTS releases of OpenJDK will be supported:
At this time, we plan to follow Oracle's LTS release cycle. So, in addition to Corretto 8 and Corretto 11, the next LTS release will be Corretto 17.
Other builds of OpenJDK are also available, including Oracle's Java, Red Hat's OpenJDK build, and a community effort by the AdoptOpenJDK organisation. AdoptOpenJDK is a grassroots effort to promote adoption of OpenJDK, and consists of a collection of commercial organisations, Java User Groups, and individual Java developers. InfoQ reached out to Martijn Verburg, Java Champion and leader of the LJC and community OpenJDK build farm project for his thoughts on the recent announcement:
Having Amazon announce Corretto is great extra recognition for OpenJDK as a viable runtime to use in Production! I think a lot of conservative organizations will see this and say "If Amazon is using OpenJDK as well as IBM, Red Hat et al, then my last doubts are now gone!"
InfoQ also asked if Amazon had worked with AdoptOpenJDK, and Verburg replied:
"Amazon worked with AdoptOpenJDK, using some of our scripts and expertise to solve kinks in their Windows and Mac installers and improve their story around testing. AdoptOpenJDK's ethos has been about Open Infrastructure As Code (See 3rd bullet point in https://adoptopenjdk.net/about.html) and Amazon was more than welcome to that resource and we look forward to continuing to work with them and have their contributions come back."
Having noted that the Tier One sponsors of the AdoptOpenJDK project include Azul Systems, IBM, the LJC, Microsoft Azure, Ocado and Packet, InfoQ also asked about Amazon's involvement with the community and the potential for fragmentation of the Java ecosystem:
AdoptOpenJDK is also discussing further initiatives with Amazon and other OpenJDK providers to assuage fears about fragmentation. For example, AdoptOpenJDK has an open test suite and test pipeline (40-60,000 tests) that any binary can be put through. This could form the basis of a shared quality bar that all OpenJDK providers could meet, and there are several other ideas like that in the works.
[...]
In order to reduce some of the potential fears about fragmentation, AdoptOpenJDK will be strongly encouraging Amazon and any other OpenJDK provider to upstream their patches to OpenJDK. Amazon agrees with this sentiment as stated in their FAQ (https://aws.amazon.com/corretto/faqs/).
Verburg was also keen to point out that the Java ecosystem reaches far and wide, both commercially and with hobbyists, and there is a need to provide a transparent build process.
A final [comment] on AdoptOpenJDK that I think is important. AdoptOpenJDK continues to be the vendor-neutral / multi-vendor community that produces extremely well tested OpenJDK builds, where end users can see exactly how binaries are built right from the O/S patch level all the way through to each library used.
He continued by cautioning that many more hardware architectures, operating systems, and Java versions also exist outside of the platforms Amazon are currently targeting with Corretto:
AdoptOpenJDK will continue to support the whole ecosystem with a wide range of platform support (ARM32/64, Win 32, AIX, Linux s390, PPC as well as Win, Mac OS X, and Linux x86) and version/variant support (Eclipse OpenJ9 VM, OpenJDK 8, 9, 10 11, Project Amber etc).
Concluding, Verburg encouraged the community to get involved in the future of Java by contributing to open source projects like those promoted by AdoptOpenJDK.
We've already had a few million downloads and an incredibly wide range of community members such as IBM, Red Hat, Azul, Ocado, SAP, the LJC (and yes Amazon as well) participating daily. This is a project that people believe is an important public resource for the software industry for a long, long time.
Moving focus back to the introduction of Corretto by Gosling at Devoxx, and with a nod to Java's coffee-themed history -- Caffè corretto is an Italian beverage, consisting of a shot of espresso with a small amount of liquor -- he shared with the Devoxx audience that he is pleased to see the open source release of 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.
Corretto 8 can be downloaded by visiting aws.amazon.com/corretto, and documentation is available which includes a Getting Started guide that provides a complete set of instructions on all supported platforms. Questions can be asked on stackoverflow or Twitter (@awsopen).