97

What are the differences between Amazon Corretto and OpenJDK (and Oracle's OpenJDK - but there is already a ticket about this)? Corretto is a OpenJDK version 8 implementation. Both are free and seem to run on most systems (Linux, Mac OS and Windows). So far Corretto is only in preview, but this will change soon. Corretto's documentation doesn't say much about differences. Are there differences in e.g. performance, garbage collection? Why would I prefer one over the other? Would you use Corretto outside of AWS?

Kris
  • 4,595
  • 7
  • 32
  • 50

5 Answers5

60

From Amazon's description:

"Patches and improvements in Corretto enable Amazon to address high-scale, real-world service concerns, meeting heavy performance and scalability demands. We’re making these 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"

So Corretto has tweaks that are specific to performance (e.g. for server or cloud applications), and also additional bug fixes that users can take advantage of that aren't necessarily in OpenJDK proper yet. Also with this Amazon is offering proper LTS support of their build, as other commercial companies are starting to do for the JDK (Oracle and Azul come to mind, as well as others).

Yishai Galatzer
  • 8,791
  • 2
  • 32
  • 41
Jason
  • 7,356
  • 4
  • 41
  • 48
  • 1
    Do think it would make sense to use Corretto outside of AWS? – Kris Nov 14 '18 at 19:22
  • 6
    Sure, I'd have no problem with it. I just perused their project on github (https://github.com/corretto/corretto-8/commits/preview-release) and it looks like they are backporting certain bug fixes from later Java versions into their Java 8 version. If there is a certain bug fix you'd really like, then go for it. – Jason Nov 14 '18 at 19:44
  • Detailed list of patches is available in the guide. ([https://docs.aws.amazon.com/fr_fr/corretto/latest/corretto-8-ug/patches.html] ) – user1853859 Nov 14 '18 at 22:01
  • 1
    I think the link is broken? ^ – Jason Nov 15 '18 at 10:19
  • 2
    Here is working link to the change log: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/change-log.html. They seem to back port a lot. – Kris Nov 15 '18 at 10:43
  • 35
    We did not yet make (nor we have plans for) AWS specific fixes. All fixes are general Java improvements as observed by applications running Amazon services or in the future reported by users. Also all fixes (other than backports) are contributed upstream to OpenJDK. We also plan to be part of the team (along with Red Hat and hopefully others) that maintains OpenJDK8u and OpenJDK11u – Yishai Galatzer Nov 20 '18 at 04:04
  • Understood, that's why it said "e.g. AWS" not "for AWS", but thanks for the clarification and the edit :) – Jason Nov 20 '18 at 10:39
  • How many (if any) of these fixes have made it into stock OpenJDK in the past year or so? I've followed the linked JDK issues in their JIRA but I don't see any backports listed for some of them (vs other issues which often have extensive backport lists). – kbolino Mar 12 '20 at 22:05
30

Other than any performance benefits, an important reason to use Corretto is for its Long Term Support of its releases, including security vulnerabilities.

One of the important differences between OpenJDK and several other vendors (like Amazon Corretto) is their release and support cycle.

OpenJDK is on a 6-month release cycle and only support each release for this time. After the next release, the previous release will stop receiving patches. This means to stay up to-to-date, you must upgrade every 6 months.

Corretto on the other hand offers LTS (Long Term Support) of their JDK builds.

Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK) that comes with long-term support (LTS). LTS includes Amazon’s commitment to provide performance enhancements and security updates at no cost until at least the specified date for the relevant release version (e.g. May 2026 for Corretto 8). Updates are planned to be released quarterly. Amazon also plans to apply urgent fixes (including security) outside of the regular quarterly cycle when they are available and ready to use.

To summarize, you have 3 options:

  1. Use OpenJDK for free, but upgrade every 6 months to get updates
  2. Use a paid JDK from Oracle or another vendor
  3. Use Corretto for free, and get free updates for several years

As you can see, Corretto is a great choice if you want to stay secure and up-to-date, don't want to pay money, and don't want to be constantly upgrading to a new version.

Here are the current end of life dates for Corretto:

  • version 8 LTS June 2026
  • version 11 LTS September 2027
  • version 17 LTS October 2029

Non-LTS versions are available as well, but are supported for a shorter period of time.

The is a variety of JDK vendors out there, so there may be other alternatives for a free and updated JDK, but be sure to read the vendors website carefully to understand their support and patching policy. Personally I think Corretto is a great choice, and something you can be confident will be patched in a timely manner.

veysiertekin
  • 1,731
  • 2
  • 15
  • 40
Despertar
  • 21,627
  • 11
  • 81
  • 79
  • Thank you! I wasn't aware of the short support duration of OpenJDK. And would you use Corretto outside of AWS? – Kris Jul 25 '21 at 16:12
  • Yes, it can be installed on several platforms including Windows, Mac, and Linux, plus has an image on DockerHub you can use for containers. – Despertar Sep 09 '21 at 03:19
  • 1
    I "guess" RedHat said they'd support OpenJDK for awhile as well: https://developers.redhat.com/blog/2018/09/24/the-future-of-java-and-openjdk-updates-without-oracle-support Also Oracle JDK starting with 17 is free again I believe... – rogerdpack Apr 22 '22 at 20:24
  • Another good option for a free and updated JDK build is Azul. Current end of life dates for Azul Zulu builds of OpenJDK: version 8 LTS December 2030, version 11 LTS September 2026, version 17 LTS September 2029. See https://www.azul.com/products/azul-support-roadmap/ for full details and https://www.azul.com/downloads/?package=jdk#download-openjdk for downloads – Sergey Grinev Oct 06 '22 at 21:45
16

I can tell you we have found a few subtle differences. We have not identified the root cause of the differences but we do know that Jasper reports generated with Corretto have minor differences in some of the offset numbers, such as leadingOffset="-2.9667969" in corretto vs "-2.737793" in the Oracle JVM. There is no visual difference but it led to failure in golden master tests. Additionally some very old deprecated tools such as text to tiff rendering are not included. Other than that we have converted many projects over to Corretto without issue.

DavesPlanet
  • 576
  • 5
  • 14
5

The patches applied are listed in the following pages:

I am not copying over as the list is going to grow over time, but the focus seems to be bug fixes and performance fixes patches and backports.

Nitsan Wakart
  • 2,841
  • 22
  • 27
0

One thing to keep in mind in comparing distributions of OpenJDK is that Long Term Support from Amazon Corretto refers strictly to updated builds of Corretto. These builds are not supported by expert Java engineering services as is the case with Oracle and Azul. There isn't an apples to apples support plan for OpenJDK from Amazon.

From aws.amazon.com/corretto/faqs: "LTS for Corretto is unrelated to AWS Support Plans, which provide expert guidance and assistance for achieving your objectives on AWS. If you already have an AWS Support Plan, Corretto is covered on the same basis as all other supported AWS Services and software. For those who do not have a plan, it may or may not make sense for you to purchase a plan if your only intention is to receive assistance with Corretto. Please visit the website to determine if it is right for you."

eecy2
  • 1
  • I think they mean that you should not invest in an AWS Support plan just for Corretto support, since you won't be gaining much more over the LTS support available for free. The AWS support plans are about that, rather than the JDK.. But it would erroneous to think that they don't care about JDK defects & security updates at all. I expect that to produce the LTS JDK versions & provide the AWS related fixes, they definitely have expert Java engineering teams behind that. – simon coleman Jan 12 '23 at 10:29