Live data from Hacker News

Amazon Corretto JDK

docs.aws.amazon.com

31–40 of 85 posts

Re: Amazon Corretto JDK

#31
post #18
post #12

Earlier quoted context omitted.

Adoptium is not "community driven" (it's made by IBM), and there is only one OpenJDK implementation, the one led and primarily developed by Oracle, with contributions from other companies. What Amazon or IBM do is build the source and distribute the binaries (look at the licence).

https://news.ycombinator.com/item?id=28821316 "...Eclipse Adoptium, built by IBM, which is the only distribution built by a team that isn't involved with the OpenJDK project, isn't very familiar with it, and isn't a member of the OpenJDK Vulnerability team, and so get security patches only after the other vendors have delivered their builds. "

That's written by the person you're replying to.

Re: Amazon Corretto JDK

#32

I’m not a java dev, but my company’s core backend uses java. What’s the main difference between this and java from adoptium? Or even from oracle. I thought they’re all from the same codebase. Is it just support? The versioning and naming of java is very confusing for me

Your comment reminded me a similar discussion was had earlier this week[0]. Coincidentally, the current top comment on this post is whichjdk.

[0] https://news.ycombinator.com/item?id=28821316

Re: Amazon Corretto JDK

#33
The best way to understand which JDK to use is to understand superficially what is involved with the source code and the build process between vendors, and their licenses.

Source code starts out the exact same, that's why they are all OpenJDK, because they take the source code from the OpenJDK public repository's main branch.

From that point on, they can choose to apply source code patches from OpenJDK that have not yet been merged into the main branch, or they could apply their own source code patches. Those patches often will be security fixes, or backported features. Here you have to understand that there is only one main branch of Java. So if you want security fixes or new features but are still on say Java 8, someone has to pull the old commit that was tagged Java 8 and selectively cherry pick a bunch of commits afterwards to apply over it that retrofits all security fixes and possibly a few select new features (like say some performance improvements patches). And if you've ever had to do a cherry pick merge on old code, you know it can be tricky and sometimes there are conflicts and maybe you even need to manually resolve them.

And even if they are not grabbing the source from an older tagged version commit, but are grabbing it from the latest tagged commit (so as of this writing Java 17), well it might already be that there are some newer commits that fixed some security bug, or other bug, or improved performance or startup, etc. So in their build of Java 17 they could even decide to apply some of those patches that happened after to the Java 17 latest release. And they might even choose to apply some patches that haven't even made it to the main branch yet, so maybe still have an open PR, or they are the ones patching something of their own.

After having grabbed the main source of OpenJDK, and potentially applied some patches to it, they proceed to build it for one or more platforms.

In the process of building, they will choose which platform to build for, such as Windows, Linux, MacOS, x64, ARM64, x86, etc. And they will choose what to include in the build, for example should you bundle Java Mission Control, javafxpackager, jarsigner, jstatd, visualvm, etc.

Finally they can choose to tests each build on each platform they built it for by running the full test suites, but they could also only partially test, as in, run only a subset of the tests, or tests only a subset of the platforms they built it for.

You'd want to run tests especially if you did patch the source, to make sure none of your patches introduced bugs, but the build could also have created an issue which tests could uncover, like forgotten to include some important C lib, or resource, or built with wrong optimization options, etc.

And last but not least, the license they choose. There's two parts here, the first one is that if they made any changes to the source of their own, their changes might be on their own license, or might not even be open source. That means you might not be able to fork the exact source they used for your own needs, or even get to see the full source they used. The second are the terms of use for each things bundled in the build. Do they let you use the JRE for cloud applications? Can you redistribute it to others? Can you use it for commercial work, etc.

Hopefully that better equips you to understand. Most of the companies who make money by building OpenJDK and offering support will probably do a good job at making sure that they backport security fixes as soon as possible, and make sure to always test everything to be sure their backport and custom patches didn't break anything, but they might not always do so for your chosen platform. But as any company who wants to make money, they need to have some of their customers pay them at some point, and that's where licensing and terms of use come in, but more and more they go full open source on their source patches and customization, allow anyone to use things for free in all settings, but offer paid support, though to be sure read their license and terms of use.

And if you can't be bothered to read their license or terms of use, that's why people have been recommending AdoptOpenJDK which is now Eclipse Adoptium. Since they're a community effort managed by a non-profit, you can be more confident that their license and terms will be and remain fully open source and free to use in all cases. The downside is that it's a community effort, you don't know if they'll apply security patches quickly, or fully test, etc. And if there's any issue with the build you encounter, there's no real support, no SLA for it, etc.

P.S.: There also exists some alternate JDKs, that are not based from the OpenJDK's main source branch, such as OpenJ9, GraalVM, Zing, JamaicaVM, etc. Those should be considered as alternate implementation of Java, they often have very different runtimes and garbage collector and all that, though they can still partially be using some of the stuff from the OpenJDK as well. While all the OpenJDK builds I was talking before always implement everything using the OpenJDK source, all they'd do is add security fixes, bug fixes, retrofit some newer features into older releases, etc. They wouldn't provide alternate implementation of anything the way that GraalVM or OpenJ9, et all, will do.

Re: Amazon Corretto JDK

#34
post #11

Could someone provide a TL;DR on the major patches/benefits that Corretto has over Adopt or other community driven JDK implementations? It is unclear from the documentation but I am assume they have some secret sauce for faster boot for their Firecracker VM instances.

quoting from https://stackoverflow.com/questions/53305934/differences-ama... """ To summarize, you have 3 options: - Use OpenJDK for free, but upgrade every 6 months to get updates - Use a paid JDK from Oracle or another vendor - Use Corretto for free, and get free updates for several years """

From Java 17 you can use Oracle Java 17 LTS for free.

Re: Amazon Corretto JDK

#35
post #23

For an opinionated comparison of various JDKs, see: https://whichjdk.com/ . (Submission thread: https://news.ycombinator.com/item?id=28820601 ) Disclaimer: no affiliation, just seemed like useful context.

Or rather go to the only comment there from someone who knows their shit https://news.ycombinator.com/item?id=28821316 and skip the site altogether.

Yeah the site is useless. I didn't comment on the last post but to summarize from a JVM/infra guy:

Use a JDK that contains the features you want and is from a vendor that gets access to embargoed Java security updates. This matters more for pre-Java 11 as certain vendors backport things like Java Mission Control/Flight Recorder and other performance and debugging features to Java 8. Post Java 11 the feature sets of the various vendors are roughly equal with much more minimal diversity.

For the most part they are generally equal. The determining factor depending on your org size might be your capacity to pay for support and your tendency to need that support. My pick is Azul but Coretto or any of the others are fine too.

Try make sure you are at least on Java 11 as the Java 8 -> 9 migration was very hairy due to modules. If you are at least on Java 11 then all future upgrades are likely to be very easy in comparison.

Re: Amazon Corretto JDK

#36
I know, I know, it doesn't really matter, but for the very curious among you, "corretto" might refer to "Caffè Corretto", an Italian flavor of espresso coffee with alcohol added to it.

The origin of "corretto" in that sense are really interesting [0].

[0]: https://punchdrink.com/articles/brief-history-italian-caffe-...

Re: Amazon Corretto JDK

#37
post #33

The best way to understand which JDK to use is to understand superficially what is involved with the source code and the build process between vendors, and their licenses. Source code starts out the exact same, that's why they are all OpenJDK, because they take the source code from the OpenJDK public repository's main branch. From that point on, they can choose to apply source code patches from OpenJDK that have not…

Is the any JDK that you are aware that bundles in the JavaFX?

Re: Amazon Corretto JDK

#38
post #22
post #11

Earlier quoted context omitted.

quoting from https://stackoverflow.com/questions/53305934/differences-ama... """ To summarize, you have 3 options: - Use OpenJDK for free, but upgrade every 6 months to get updates - Use a paid JDK from Oracle or another vendor - Use Corretto for free, and get free updates for several years """

You also have Zulu from Azul.

Which has been a staple of long-term JVM production guys for a long time. You can use their releases free of licensing but can get commercial support if/when you need it.

Re: Amazon Corretto JDK

#39

I’m not a java dev, but my company’s core backend uses java. What’s the main difference between this and java from adoptium? Or even from oracle. I thought they’re all from the same codebase. Is it just support? The versioning and naming of java is very confusing for me

Java is like C and C++, there are plenty of implementations to chose from.

Each has their own set of strong points regarding JIT, AOT, GC capabilities, which one to select is usually based on the use case.

Unless doing something special, you are pretty safe using a regular OpenJDK distribution.

Re: Amazon Corretto JDK

#40

I've peripherally known Corretto is the Amazon distribution of Java (specifically, OpenJDK), but I never really looked up what the difference between, say, the releases from AdoptOpenJDK and Corretto are. I looked it up, it looks like it's generally: 1. LTS support - adoptopenjdk doesn't do LTS 2. Patches that come from Amazon that are upstreamed to OpenJDK but appear in Corretto first since, you know, that's where A…

IIRC we had to move to Corretto when using AWS CodeBuild, because AWS dropped support of AdoptOpenJDK in their CodeBuild container images.

So basically we use AWS distro to run tests and build our docker images, and those images use AdoptOpenJDK; which is not ideal, but so far we have been OK.

Post reply on HN