New release brings 18 JDK enhancements to improve the Java language, expand its AI capabilities, and help developers accelerate productivity
Oracle today announced the availability of Java 25, the latest version of the world's number one programming language and development platform. Java 25 (Oracle JDK 25) will help organizations drive business growth by delivering thousands of enhancements that increase developer productivity and improve platform performance, stability, and security. Additionally, Oracle will provide long-term support for Java 25 for at least eight years. Learn more about JDK 25 technology at Java 25 broadcast .
“As Java embarks on its fourth decade, it continues to deliver capabilities to help ensure that applications, including those powered by and integrated with AI capabilities, are highly efficient and scalable across all hardware platforms,” said Arnal Dayaratna, research vice president, software development, IDC. “Oracle’s Java technology stewardship continues to lead the evolution of the Java programming language and platform, particularly with regard to AI and security, and Java’s consistent six-month release cadence is designed to further accelerate innovation. As a result, Java is well-positioned to deliver a continuous stream of modern capabilities that address the development of next-generation AI-powered applications.”
"Java marked a significant milestone this year with its 30th anniversary, and the platform and language continue to evolve to help developers quickly and easily build applications with innovative AI and security features," said Georges Saab, senior vice president, Oracle Java Platform and chairman of the OpenJDK board. "Java 25 highlights Oracle's continued investment in features and capabilities that power AI solutions and simplify the language, making Java easier to learn for new developers and IT teams."
Oracle plans to offer long-term support for Java 25 for at least eight years, giving organizations the flexibility to keep applications in production longer with minimal maintenance and eventually migrate on their own terms. Oracle JDK 25 is planned to receive quarterly security and performance updates through September 2028 under Oracle's No-Fee Terms and Conditions (NFTC), and JDK 25 updates released after that date will be offered under the Java SE Over-the-Counter (OTN) License, which is planned to last until at least September 2033.
Major JDK Improvement Proposals (JEPs)
Oracle JDK 25 Language Features
- JEP 507: Primitive types in patterns, instanceof and switch (third preview): It helps developers increase Java programming productivity by making it more consistent and expressive. For example, developers can improve pattern matching by removing constraints on primitive types encountered when using pattern matching, instanceof, and switch. It also allows primitive type patterns in all pattern contexts and extends instanceof and switch to work with all primitive types. Primitive type support will especially benefit developers building applications that integrate AI inference.
- JEP 511: Module import statements: It helps developers accelerate productivity by allowing them to easily import all packages exported by a module, without requiring the import code to be in the module itself. This simplifies the reuse of modular libraries for all developers and helps beginners use third-party libraries and core Java classes without having to learn their location in a package hierarchy. Additionally, developers can avoid the hassle of multiple on-demand type import statements when using multiple API parts exported by a module, which is beneficial for simple applications that combine AI inference and popular library workflows.
- JEP 512: Compact source files and main instance methods: It helps make the Java language more accessible to beginners and system and IT administrators, offering a gentle introduction to Java programming. Students can write their first programs concisely, without needing to understand language features designed for large programs, and can easily develop their code as their skills expand. Additionally, system and IT administrators who may not be Java experts can reduce the process by writing small programs, such as scripts and command-line utilities.
- JEP 513: Flexible builder bodies: Allows developers to improve code safety and reliability by enabling input validation and safe computations before explicitly invoking a constructor. This improves code safety by allowing more natural constructor expressions and enabling field initialization before they become visible to other class code, such as methods called from a superclass constructor. It also improves reliability by preserving the protection that prevents subclass constructors from interfering with superclass instantiation.
Oracle JDK 25 Libraries
- JEP 505: Structured competition (fifth preliminary): It helps developers improve the maintainability, reliability, and observability of multithreaded code by simplifying concurrent programming. By treating groups of related tasks running on different threads as a single unit of work, structured concurrency helps mitigate common risks arising from cancellation and shutdown, such as thread leaks and cancellation delays. This is especially beneficial for AI development, which often involves executing multiple tasks in parallel.
- JEP 506: Scoped values: Help developers increase the ease of use, understandability, performance, and robustness of their projects by enabling the sharing of immutable data within and between threads. This particularly benefits applications that use AI platforms, web frameworks, and microservices. Furthermore, scoped values are easier to reason about than thread-local variables and have lower space and time costs, especially when used in conjunction with virtual threads and structured concurrency.
- JEP 502: Stable values (visualization): Help developers increase flexibility by introducing an API for stable values, which are objects that contain immutable data. Because stable values are treated as constants by the Java Virtual Machine, they allow for the same performance optimizations as declaring a final field, while also offering greater flexibility in initialization time.
- JEP 508: Vector API (10The incubator): It helps developers improve productivity through an API that expresses vector calculations that are reliably compiled at runtime to optimal vector instructions on supported CPU architectures. As a result, developers can achieve superior performance over equivalent scalar calculations, which are frequently used in AI inference and computing scenarios.
Oracle JDK 25 Security Libraries
- JEP 470: PEM encodings of cryptographic objects (preview): Help developers increase productivity with a new object encoding API. The API encodes objects representing cryptographic keys, certificates, and certificate revocation lists into the widely used, privacy-enhanced email transport format and decodes that format back into objects. This makes it easier for developers to integrate Java applications with security authentication systems and devices, such as Yubikeys.
- JEP 510: Key Derivation Function API: Helps developers prepare for emerging quantum computing environments by providing an API for key derivation functions, which are cryptographic algorithms for deriving additional keys from a secret key and other data. This provides a necessary building block for supporting hybrid public-key cryptography, helping enable a smooth transition to quantum-safe cryptography.
Oracle JDK 25 Performance Updates
- JEP 519: Compact object headers: Help developers increase productivity by reducing object header sizes to 64 bits on 64-bit architectures. This improves deployment density and increases data locality, while simultaneously reducing object size and memory consumption under realistic workloads.
- JEP 514: Early command line ergonomics: It helps developers accelerate productivity by making it easier to create early caches without losing expressiveness. This speeds up Java application startup by simplifying the commands required for common use cases.
- JEP 515: Early method profiling: It helps developers increase productivity by accelerating application performance. Warm-up time is improved by shifting the collection of execution profiles from the initial method of production runs to training runs, passing the profiles through the cache in advance. This allows the JIT compiler to generate native code immediately after application startup, instead of waiting for profiles to be collected. It also eliminates the need for any changes to application code, libraries, or frameworks and removes any restrictions on application execution.
Oracle JDK 25 Monitoring Updates
- JEP 509: JFR CPU Time Profiling (Experimental): Helps developers improve the productivity and efficiency of their programs by enhancing the JDK Flight Recorder (JFR) to capture more accurate CPU time profiling information on Linux and helping identify program elements for optimization.
- JEP 518: JFR Cooperative Sampling: Helps developers increase code reliability by improving JFR's stability when asynchronously sampling Java thread stacks. This allows JFR to minimize safepoint bias in event samplers, avoiding risky heuristics that generate stack traces outside of safepoints. It also allows for the creation of sample requests in response to a hardware event or within a signal handler, reducing the amount of work the sampler thread must perform.
- JEP 520: JFR Method Timing and Tracking: It helps developers accelerate productivity by enabling them to identify application performance bottlenecks, optimize code, and find the root causes of bugs. This is achieved by extending JFR with features for timing and method tracing through bytecode instrumentation.
The features in Java 25 are the result of ongoing collaboration between Oracle and other members of the global Java developer community through OpenJDK and the Java Community Process (JCP). For more details on Java 25 features, see the Java Technical Blog 25. Additionally, Java innovations from across the global community will be showcased at JavaOne 2026 in Redwood Shores, CA, March 17–19, 2026. Read more about JavaOne 2026 on here and sign up for updates on here.
“Since its inception 30 years ago, Java has remained a reliable and secure language for building large-scale enterprise applications,” said Adam Resnick, research manager for modern software development and developer trends at IDC. “As highlighted at this year’s JavaOne conference, Java is poised to expand its reach among beginning developers and programming students. New features that simplify complexity and provide immediate feedback are making it easier for beginners to create programs. Java’s continued evolution reflects a careful balance, expanding its accessibility to less experienced developers while preserving the robustness required for enterprise-grade solutions.”
Supporting the global Java community with innovation in the cloud
Java delivers greater innovation, performance, efficiency, and cost savings when deployed on Oracle Cloud Infrastructure (OCI), which is the first hyperscale cloud to support Oracle JDK 25. By providing Oracle Java SE and advanced features, such as the Java SE Subscription Enterprise Performance Pack, at no additional cost on OCI, Java 25 helps developers build and deploy applications that run faster, better, and with optimized cost-performance.
O Oracle Java SE Universal Subscription offers customers best-in-class support. This includes the Java SE Subscription Enterprise Performance Pack, triage support for the entire Java portfolio, Java Management Service, and the flexibility to upgrade at the pace of customers' business. This helps IT teams manage complexity, reduce security risks, and contain costs.
In addition to the benefits of Java on OCI and the Oracle Java Universal SE Subscription, Java 25 offers improved application performance and a wide range of AI and security features, including support for post-quantum cryptography (PQC), to help improve the performance, stability, and security of Java SE platform and JDK implementations.
Global Java Community Leaders Welcome Oracle JDK 25
“When Java moved to a six-month release, it seemed impossible that exciting new features could be broken down into chunks small enough to be delivered this way—and it seemed possible that some releases wouldn’t have much at all,” said Trisha Gee, head of advocacy at Gradle, Inc. “How wrong we were! Every new Java release has interesting and useful features, and it’s been a wonderful lesson in breaking large deliverables into small, self-contained chunks. For example, the various pattern matching features are self-contained and shippable, but they all add up to a fantastic set of new features for Java and a new way for Java developers to think about solving their problems. Java continues to grow and grow stronger.”
"JEP 512 introduces 'compact source files and main instance methods,' which dramatically simplifies Java for beginners, allowing them to write programs without the traditional boilerplate code public static void main(String[] args)," said Rémi Forax, adjunct professor at Université Gustave Eiffel. "Students can now start with simple programs and gradually expand their understanding to more advanced concepts as they grow, creating a smooth learning path from basic programming concepts to fully object-oriented programming."
“My favorite parts of Java 25 are compact source files, main instance methods, and module import declarations, as these features create a low-ceremony on-ramp to Java for beginning programmers,” said Cay Horstmann, professor emeritus at San José State University. “They also benefit experienced programmers by expanding Java’s reach to small, everyday tasks. I find it very rewarding to rewrite brittle shell or Python scripts in Java—an industrial-grade, strongly typed language with great tool support.”
"When the six-month feature release cadence was announced with Java 9, I was one of the biggest skeptics, and I even said so publicly. Could Oracle pull it off? "I had my doubts, as we were accustomed to a new release every three years," said Dr. Heinz M. Kabutz, author of The Java Specialists newsletter. "But Oracle has indeed done it, and with enthusiasm. Under Oracle's leadership and with a huge community driving it, Java is outpacing other languages. Records, compact source files, and module imports make Java much easier to access, and virtual threads, the foreign memory API, the array API, and ZGC make Java suitable for building technically advanced, scalable systems."
“Java’s greatest strength is its community. At JUG Oberpfalz, we’re restarting our “(Re)Start with Java” talks in 2025, and developers are always impressed by how far the language has come,” said Richard Fichtner, CEO of XDEV Software GmbH. “Modern Java is more productive, secure, and innovative than ever before—proof of what community and collaboration can achieve.”
To learn more about Java and its global ecosystem, visit:
- Java: the official portal for learning Java
- Java: News and opinions from members of the Oracle Java team
- Java YouTube: The official Java YouTube channel to learn Java with videos
Additional resources
- Download Oracle JDK 25
- Read the Java Technical Blog 25
- Learn more about the JavaOne 2026 and subscribe to receive updates
- Watch the live broadcast of Java 25
- Learn more about the Oracle Java SE Universal Subscription
- Learn more about the Java Management Service
00About Oracle
Oracle offers integrated application suites and a secure, autonomous framework on the Oracle Cloud. For more information about Oracle (NYSE: ORCL), visit www.oracle.com.
Trademarks
Oracle, Java, MySQL, and NetSuite are registered trademarks of Oracle Corporation. NetSuite was the first cloud company, ushering in the new era of cloud computing.
Contact information
OracleBrasil@CurrentGlobal.com