New Relic recently published a new report on the State of the Java Ecosystem using data gathered in January 2022 from millions of anonymized applications that provided performance data.
According to the report, Java 11 is the new standard for production environments as the adoption climbed from 11% in 2020 to 48% in 2022, moving ahead of Java 8, a close second at 46%. Other LTS versions of Java are very distant and their usage is just a tiny fraction.
The image below shows the usage of Java releases:
Looking at non-LTS versions, the most popular appears to be Java 14, followed by Java 15 and Java 12, but their usage is below 1%. Starting from Java 9, a new release is made available with a six-month cadence, but those releases are supported until the next iteration. Many vendors don’t provide support for non-LTS versions after the end of their support, which probably explains why non-LTS versions are used less often.
The graph below shows the adoption of different JDK distributions in the Java ecosystem. Oracle, historically had been the most popular vendor, but its adoption has shrunk from 75% in 2020 to 34% in 2022. Impressive growth has emerged for Amazon Corretto which stands at 22% in 2022, up from about 3% in 2020. AdoptOpenJDK was second in 2020 at 7%, but in 2021, after having moved to the Eclipse Adoptium Project, scored a higher percentage at 11% in 2022, but moved down to the third place. Azul Systems increased its adoption to 8% from 3% in 2020.
The image below shows the JDK distributions usage:
Containers are very popular with 70% of applications that are being executed within container technology. The report shows that 60% of the applications running in a container are using two cores or less. This makes sense since containers are often associated with a microservice architecture. However, this configuration can be detrimental since the default G1 garbage collector works best with two or more cores.
The G1 Garbage collector has been the default since Java 11, therefore its usage stands at 68% for Java versions after 11. Serial GC is still at almost 23% for Java 11 and later versions while other recent garbage collectors, such as ZGC and Shenandoah, became production-ready recently so their adoption is still very low.
The image below shows the usage of different garbage collectors:
New Relic is a company that develops one of the leading observability platforms providing developers metrics, events, logs, and traces.
The complete version of the 2022 report is available on the New Relic website.
Details of the previous New Relic survey, conducted and published in 2020, may be found in this InfoQ news story.