Java 25 LTS: The New Features in JDK 25

 

Transcript:

Look what I've got here. All Ja ps of JDK 25. Let's open it up and see what the new LTS version brings us. Oh, look. Here's something that will accelerate the start of Java applications. Goodies from Project Leaden. Ahead of time command line ergonomics facilitates the creation of ahead of time cache. Instead of running two commands to create a cache, you can now run only one thanks to new command line option AOT cache output. Ahead of time method profiling extends the AOT cache introduced in JDK 24 to collect method profile during training runs. Now JVM has even less work to do at app start. So the app starts and reaches peak performance even faster.

Now that is something for better garbage collection. Generational mode of Shannondoa GC had become production ready. So you can use it in the enterprise app and get sustainably high throughput with reduced memory and power usage.

Wow, this is something exciting. Improvements to Java flight recorder to get even better measurements of your application performance. Wow, Swissmate must be very accurate. Java flight recorder can now use Linux kernel CPU timer to safely produce CPU time profiles of Java programs. Also, JFR cooperative sampling redesigns JFR sampling mechanism to parse thread stacks only at safe points but at the same time minimize the safe point bias.

The letter may affect the accuracy of profiling if often executed code is far from safe points. Anyway, this feature should promote safety and stability of profiling. Also, JFR now supports two new events, method timing and method trace. This way, developers can analyze method timing and tracing in testing and production easily and accurately.

Wow, I could have missed these ones. They are so tiny. These are compact object headers. They became production ready in JDK25. The size of the object header was reduced to 64 bits on 64-bit platforms, reducing CPU time and hip space. Flexible at start and locked solid when you apply it. That's stable values, ladies and gents. Stable values are objects holding a single data value. For instance, a logger. A stable value is initialized before its content is first retrieved. After that, it is immutable. This way they improve the startup time of Java apps thanks to deferred initialization and offer the same reliability of final fields.

Okay, this is something that can be sealed tight. That's scope values. Something to carry your data safely. Finalize. By the way, scope values carry immutable data that a method can share with its colleagues or child threats. They can help to increase code clarity and reliability. One package, multiple tool inside. Of course, that's module import declarations. Finalized developers can simply import a module and all module packages will be imported behind the scenes. Beginner and minimalist friendly.

Nice efficiency at its finest. Start small and work your way up to a complex program with compact source files and instance main methods. Finalized. By the way, this feature allows the developers who just started learning Java write single class programs with simplified syntax and expand them with time. Season devs will also like this feature as they can write small programs without extra complications. You know that is actually very useful. Flex it before enjoying your drink. And that's flexible constructor bodies finalized. With flexible constructor bodies, developers can initialize some fields or perform required computations in a constructor body before the constructor invocation. So no more boilerplate code in additional methods.

For hardcore security, no one will sneak into your system with new cryptographic capabilities. With a finalized key derivation function API, developers can use sophisticated cryptographic algorithms in Java code. In addition, Java 25 introduces a preview of a new API for converting between objects representing cryptographic keys and certificates and privacy enhanced mail transport format in a standardized and convenient way.

Wow, the yellow patterns finally have a cutter for every primitive type. Developers can now work with any type in patterns, instance of and switch. It means uniform data management, safe casts, and more lon code. Oh, structured concurrency. I need this one. I'm sick of threats scattered around in weird places. Think of a parent task as a magnet. It holds all subtasks tightly together in one place, waits for all of them to succeed, and monitors for failures. If one tasks failed, others are cancelled. You can clearly see the structure in the code.

Hmm I think I got this one last year and the year before that. Oh, it's the vector API. Well, maybe I will learn how to use it properly by the time it's finalized. Right now, the API for expressing multiple vector computations is being further refined. Let's wait for the introduction of project file hollow to the open GDK and then vector API will be promoted to preview. Hmm  I guess that's it. Nothing more left. Where did the 32bit x86 port go? I suggest we take a minute and honor the memory of open GDK port to 32bit x86 machines. No new 32bit only x86 hardware is manufactured anymore. So, the community had to let the port go and remove its source code. JDK25 will see the light in September, but you can get early access builds to experiment with new features.

If you enjoyed this video and had fun with it, like, share, and of course, subscribe for more content like that. Until next time.

Summary

In this video, JDK 25 highlights include improved AOT caching, faster startup, and production-ready generational Shenandoah GC. Java Flight Recorder gets better profiling tools, and features like compact object headers, stable values, and flexible constructor bodies are finalized. Coding is simplified with module import declarations and instance main methods. Support for 32-bit x86 has been removed.

About Catherine

Java developer passionate about Spring Boot. Writer. Developer Advocate at BellSoft

Social Media

Videos
card image
Mar 9, 2026
jOOQ Deep Dive: CTE, MULTISET, and SQL Pipelines

Some backend developers reach the point where the ORM stops being helpful. Complex joins, nested result graphs, or CTE pipelines quickly push frameworks like Hibernate to their limits. And when that happens, teams often end up writing fragile raw SQL strings or fighting performance issues like the classic N+1 query problem. In this video, we build a healthcare scheduling application NeonCare using jOOQ, Spring Boot 4, and PostgreSQL, and show how to write production-grade SQL directly in Java while keeping full compile-time type safety.

Videos
card image
Feb 27, 2026
Spring Developer Roadmap 2026: What You Need to Know

Spring Boot is powerful. But knowing the framework isn’t the same as understanding backend engineering. In this video, I walk through the roadmap I believe matters for a Spring developer in 2026. We start with data. That means real SQL — CTEs, window functions, normalization trade-offs — and understanding what ACID and BASE actually imply for system guarantees. Spring Data JPA is useful, but you still need to know what happens underneath. Then architecture: microservices vs modular monolith, serverless, CQRS, and when HTTP, gRPC, Kafka, or WebSockets make sense. Not as buzzwords — but as design choices with trade-offs. Security and infrastructure follow: OWASP Top 10, AuthN vs AuthZ, encryption in transit and at rest, Docker, Kubernetes, Infrastructure as Code, and observability with Micrometer, OpenTelemetry, and Grafana. This roadmap isn’t about mastering every tool. It’s about knowing what affects reliability in production.

Further watching

Videos
card image
Apr 2, 2026
Java Memory Options You Need in Production

JVM memory tuning can be tricky. Teams increase -Xmx and assume the problem is solved. Then the app still hits OOM. Because maximum heap size is not the only thing that affects memory footprint. The JVM uses RAM for much more than heap: metaspace, thread stacks, JIT/code cache, direct buffers, and native allocations. That’s why your process can run out of memory while heap still looks “fine”. In this video, we break down how JVM memory actually works and how to control it with a minimal, production-safe set of flags. We cover heap sizing (-Xms, -Xmx), dynamic resizing, direct memory (-XX:MaxDirectMemorySize), and total RAM limits (-XX:MaxRAMPercentage) — especially in containerized environments like Docker and Kubernetes. We also explain GC choices such as G1, ZGC, and Shenandoah, when defaults are enough, and why GC logging (-Xlog:gc*) is mandatory before tuning. Finally, we show how to diagnose failures with heap dumps and OOM hooks. This is not about adding more flags. It’s about understanding what actually consumes memory — and making decisions you can justify in production.

Videos
card image
Mar 26, 2026
Java Developer Roadmap 2026: From Basics to Production

Most Java roadmaps teach tools. This one teaches order — the only thing that actually gets you to production. You don’t need to learn everything. You need to learn the right things, in the right sequence. In this video, we break down a practical Java developer roadmap for 2026 — from syntax and OOP to Spring, databases, testing, and deployment. Structured into 8 levels, it shows how real engineers grow from fundamentals to production-ready systems. We cover what to learn and what to ignore: core Java, collections, streams, build tools, Git, SQL and JDBC before Hibernate, the Spring ecosystem, testing with JUnit, and deployment with Docker and CI/CD. You’ll also understand why most developers get stuck — jumping into frameworks too early, skipping SQL, or treating tools as knowledge. This roadmap gives you a clear path into real-world Java development — with priorities, trade-offs, and production context.

Videos
card image
Mar 19, 2026
TOP-5 Lightweight Linux Distributions for Containers

In this video, we compare five lightweight Linux distributions commonly used as base images: Alpine, Alpaquita, Chiseled Ubuntu, RHEL UBI Micro, and Wolfi. There are no rankings or recommendations — just a structured look at how these distros differ so you can evaluate them in your own context.