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
Feb 6, 2026
Backend Developer Roadmap 2026: What You Need to Know

Backend complexity keeps growing, and frameworks can't keep up. In 2026, knowing React or Django isn't enough. You need fundamentals that hold up when systems break, traffic spikes, or your architecture gets rewritten for the third time.I've been building production systems for 15 years. This roadmap covers three areas that separate people who know frameworks from people who can actually architect backend systems: data, architecture, and infrastructure. This is about how to think, not what tools to install.

Videos
card image
Jan 29, 2026
JDBC Connection Pools in Microservices. Why They Break Down (and What to Do Instead)

In this livestream, Catherine is joined by Rogerio Robetti, the founder of Open J Proxy, to discuss why traditional JDBC connection pools break down when teams migrate to microservices, and what is a more efficient and reliable approach to organizing database access with microservice architecture.

Further watching

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.

Videos
card image
Feb 18, 2026
Build Typed AI Agents in Java with Embabel

Most Java AI demos stop at prompt loops. That doesn't scale in production. In this video, we integrate Embabel into an existing Spring Boot application and build a multi-step, goal-driven agent for incident triage. Instead of manually orchestrating prompt → tool → prompt cycles, we define typed actions and let the agent plan across deterministic and LLM-powered steps. We parse structured input with Ollama, query MongoDB deterministically, classify risk using explicit thresholds, rank affected implants, generate a constrained root cause hypothesis, and produce a bounded containment plan. LLM handles reasoning. Java enforces rules. This is about controlled AI workflows on the JVM — not prompt glue code.

Videos
card image
Feb 12, 2026
Spring Data MongoDB: From Repositories to Aggregations

Spring Data MongoDB breaks down fast once CRUD meets production—real queries, actual data volumes, analytics. What looks simple at first quickly turns into unreadable repository methods, overfetching, and slow queries. In this video, I walk through building a production-style Spring Boot application using Spring Data MongoDB — starting with basic setup and repositories, then moving into indexing, projections, custom queries, and aggregation pipelines. You'll see how MongoDB's document model changes data design compared to SQL, when embedding helps, and when it becomes a liability. We cover where repository method naming stops scaling, how to use @Query safely, when to switch to MongoTemplate, and how to reduce payload size with projections and DTOs. Finally, we implement real MongoDB aggregations to calculate analytics directly in the database and test everything against a real MongoDB instance using Testcontainers. This is not another MongoDB overview. It's a practical guide to actually using Spring Data MongoDB in production without fighting the database.