Frameworks

Datadog State of Java: Java 21 Leads Production Adoption as AI Usage Surges

Java is more than 30 years old, yet it is still changing. A new Datadog report looks at real production services and shows which Java versions, tools, and habits teams use today.

Datadog State of Java report: Java 21 leads production adoption as AI usage surges
Datadog's State of Java report looks at how Java runs in production today.

Datadog, a company that monitors software, has published its State of Java report. It uses profiling data from hundreds of thousands of production Java services. The headline result: Java 21 is now the most used Java version, and the use of AI libraries in Java has grown fast.

Datadog says Java is the most widely used language in the services it monitors. Yet many developers still see it as heavy and slow. The report suggests that picture is out of date.

Java 21 overtakes Java 17

Java 21 now powers 40% of production services. Java 17 follows with 31%. Java 25, released in September 2025, has already reached 9%. Java 8 and Java 11 together still make up 16%.

New Java versions arrive every six months, but most teams do not upgrade that often. They wait for Long-Term Support (LTS) versions, which get security and performance fixes for years. The LTS versions are 8, 11, 17, 21, and 25, and together they cover 96% of services.

Plain idea: an LTS version is like a car model the maker promises to keep repairing for a long time. Most companies pick those instead of every new release.

Newer Java runs faster

The report looks at p99 latency. That means the time that 99 out of 100 requests finish within, so it shows the slow end of a service. The median p99 latency fell with each LTS version:

  • Java 8: 230 ms
  • Java 11: 145 ms
  • Java 17: 83 ms
  • Java 21: 64 ms

That is nearly four times better between Java 8 and Java 21. The gain remains when the framework is held the same. For Spring services, the median p99 fell from 333 ms on Java 8 to 61 ms on Java 21.

Java 21 also brings virtual threads. They let a server handle many requests at once with the usual one-thread-per-request style, without rewriting the app in a reactive style.

Newer versions are also better patched

About 90% of Java 25 services are current or only one patch behind. The median Java 21 service is two patches behind, Java 17 is five behind, and Java 11 is ten behind. Java releases patches every quarter, so a median Java 11 service is about 2.5 years out of date.

Datadog makes a careful point here. An old Java version is not a security problem by itself, because LTS versions keep getting fixes. The problem is skipping the patches. Patching needs no code changes, so it is hard to justify putting it off. Outdated services can stay open to known vulnerabilities and miss the timelines that many compliance rules require.

Two vendors supply most JDKs, but one JVM runs nearly everything

Java is a specification, so many vendors ship their own build, called a JDK (Java Development Kit). The two leaders are Eclipse Temurin at 35% and Amazon Corretto at 33%. Oracle, Red Hat, and Azul Zulu hold smaller shares.

The choice rarely changes the engine underneath. HotSpot, the standard JVM (Java Virtual Machine), runs more than 98% of services. Other options exist for special reasons. For example, GraalVM Native Image compiles an app ahead of time so it starts faster, which helps with serverless cold starts.

Cloud habits matter too. AWS hosts over 60% of Java services, and 41% of those run Corretto, which is the default on Amazon Linux. On Google Cloud only 9% of services run Corretto, and on Azure only 11%.

AI use in Java has tripled

As of October 2026, 14.1% of Java services declare at least one AI or ML library. In January 2025 it was 4.6%. Java is growing faster in relative terms than other languages, but it still trails them in total share. The gap grew from 3.7 to 6.7 percentage points.

Part of the reason is that Python owns most model training. The Java libraries that are growing are for using models, such as Spring AI and LangChain4j. They call models, fetch context, and run tools instead of building models.

  • Spring AI reached version 2.0 in June 2026. It gives Spring Boot apps ready-made support for model providers, vector stores, retrieval, and tool calling.
  • LangChain4j does a similar job outside Spring and is the standard path in Quarkus.
  • Both now support the Model Context Protocol, which connects models to an app's own tools and data.

Watch the version: Spring AI 2.0 needs Spring Boot 4 and Spring Framework 7. Teams on older versions must upgrade before they can use it.

Java now lives in containers

Java used to run mostly on big application servers that hosted many apps on one large machine. That has changed. Nearly four out of five Java services now run in containers. Virtual machines carry 8%, and serverless setups, including AWS Fargate, carry 14%.

In a container, each app has its own settings packaged with it. Instances can be replaced easily, and teams add capacity by adding more copies instead of growing one big server.

Most services never pick a garbage collector

A garbage collector (GC) clears memory the program no longer needs. Different collectors trade off speed, pause time, and CPU use. Datadog says the easiest win is often to pick a collector that suits your workload, yet 69% of services keep the default.

  • Defaults depend on size: small containers get Serial GC, and server-sized ones get G1 on newer Java.
  • Serial is common: 28% of services run Serial just by default. It works in one thread, which can leave resources idle and cause longer pauses.
  • G1 is chosen on purpose: 24% of services pick it explicitly. It collects in parallel and lets you set a pause target.
  • Low-pause collectors are rare: ZGC and Shenandoah have tiny pauses (Shenandoah about 11 ms, ZGC a fraction of a millisecond at p95), but they are only 2% of usage.

By comparison, p95 pauses for G1, Serial, and Parallel are measured in hundreds of milliseconds. Learn more in the official Java garbage collection tuning guide.

Most Java services handle very little traffic

Even at their busiest hour, 52% of Java web services handle fewer than one request per second. Only 7% handle more than 100 requests per second. Even among services allowed 32 or more cores, 38% stay under one request per second.

Datadog notes that request rate alone does not prove a service is over-provisioned. Still, it suggests that many teams have not adjusted their sizing to match the faster modern JVM.

Spring dominates, Quarkus is busier

Spring is used by 78% of Java services, counting both Boot and non-Boot. Spring Boot includes a server inside the app, which fits neatly into a container image. Older non-Boot Spring apps are more common on VMs.

Quarkus is much less common, but its services are busier. 53% of Quarkus services handle over 100,000 requests a day, compared with 38% of Spring services. Quarkus does more work at build time, so it spends less CPU in framework code: a median of 0.32% versus 1.45% for Spring.

Unlike a JDK or a garbage collector, a framework cannot be swapped with a flag. Changing it means changing code, so it fits new services better than old ones.

Old habits stay around

Libraries tend to cluster by cloud provider, framework, and workload. Teams also keep old dependencies. The report found that 23% of services still declare Joda-Time, although its maintainers have urged users to move to the built-in java.time API for more than ten years.

What Datadog expects next

  1. More Java 25Datadog expects a big rise as it becomes the long-running current LTS.
  2. More G1It is expected to rise as teams test it ahead of becoming the default for new Java releases.
  3. More AI librariesGrowth should continue, though Spring AI 2.0 needing Spring Boot 4 may slow some teams.
  4. Virtual threadsAdoption was too small to report, but it should grow as Java 21 and newer become the majority.

A note on the data

Most findings come from Java services on June 15, 2026, and the AI numbers run through October 2026. Datadog says its comparisons are observational. They show links between things, not proof that one factor caused another.

What It Means for Developers

The report points to a few simple, low-cost steps. Several need only a setting or a restart, not a rewrite.

What It Means for Software Developers

  • If you are on Java 8, 11, or 17, plan a move to Java 21 or Java 25. The data links newer LTS versions to lower p99 latency.
  • Use virtual threads on Java 21 to scale a request-per-thread server without a reactive rewrite.
  • If you add AI features, look at Spring AI or LangChain4j instead of hand-written HTTP calls to model APIs.
  • Replace Joda-Time with java.time when you touch that code.
  • New to the language? Start with our Java tutorial.

What It Means for Backend Developers

  • Check your Spring version before planning AI work. Spring AI 2.0 needs Spring Boot 4 and Spring Framework 7.
  • For high-traffic new services, compare Spring with Quarkus. The report shows Quarkus using less CPU inside framework code.
  • Remember that a framework switch is a code change, so it suits new services more than old ones.

What It Means for DevOps Engineers

  • Keep up with quarterly patch releases. Patching needs no code change and closes known holes.
  • Set the garbage collector on purpose. A service that quietly gets Serial in a small container may not be the best fit.
  • Review container CPU and memory sizes. Many services handle fewer than one request per second, so check whether your limits match real use.
  • Pick a JDK vendor based on support and platform. Most of the market uses the same HotSpot JVM anyway.
  • Working on AWS? See our AWS tutorials.

Bottom line

Datadog's report shows a Java ecosystem that is modernizing in uneven steps. Java 21 leads, newer versions are faster and better patched, containers are the norm, and AI libraries are growing quickly.

The simplest wins are small: patch regularly, choose a garbage collector on purpose, and move to a newer LTS version when you can.

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author