
Java 25 debuts with AI, security & productivity upgrades
Oracle has announced the general availability of Java 25, the most recent version of its programming language and development platform.
The new version brings 18 JDK Enhancement Proposals (JEPs) that focus on improving the Java language, platform performance, stability, security, artificial intelligence (AI) capabilities, and developer productivity. Oracle will provide long-term support for Java 25 for a minimum of eight years, allowing organisations extended production deployments with minimal maintenance before migrating at their discretion.
Major enhancements
Java 25 includes a series of updates to both the language and core libraries. These comprise JEP 507, enabling primitive types in patterns, instanceof, and switch as a third preview, a move aimed at improving programming productivity and making Java more uniform and expressive. JEP 511 introduces module import declarations, allowing all packages exported by a module to be imported easily without the need for importing code to be within its own module, simplifying the use of third-party libraries and fundamental Java classes.
Another enhancement, JEP 512, delivers compact source files and instance main methods. This feature is designed to support beginners and system administrators, enabling a smoother entry into Java programming. JEP 513 introduces flexible constructor bodies, aimed at boosting code safety and reliability by permitting validation and computation prior to explicit constructor invocation.
Library and performance improvements
The update also offers key library changes. JEP 505 on structured concurrency supports the reliability and observability of multi-threaded code, which is relevant for AI-driven applications that run multiple parallel tasks. JEP 506 introduces scoped values for easier and clearer sharing of immutables among threads, while JEP 502 presents an API for stable values, allowing for performance optimisations similar to declaring a field final but with increased flexibility.
Developers working on AI inference and computation scenarios will benefit from JEP 508, the tenth incubator of the Vector API, which allows vector computations that compile to optimal vector instructions on supported CPUs.
Security enhancements include JEP 470, offering new APIs for encoding and decoding cryptographic objects in privacy-enhanced mail transport format, and JEP 510, an API to prepare for quantum computing environments through key derivation functions supporting hybrid public key encryption.
Monitoring and support
Additional updates focus on monitoring and application performance. JEP 509 and JEP 518 introduce new profiling and sampling capabilities to the JDK Flight Recorder (JFR), intended to provide improved CPU-time profiling and cooperative thread stack sampling. JEP 520 extends JFR with method timing and tracing for diagnosing performance bottlenecks and bugs.
Oracle intends to deliver quarterly security and performance updates for Java 25 under the No-Fee Terms and Conditions until September 2028 and then under the Java SE OTN Licence through at least September 2033.
Industry perspectives
"As Java embarks on its fourth decade, it continues to deliver features to help ensure that applications, including those powered by and integrated with AI capabilities, will be highly efficient and scalable across hardware platforms. Oracle's Java technology stewardship continues to lead the evolution of the Java programming language and platform, especially in relation 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 features that address next-generation, AI-powered application development."
These comments from Arnal Dayaratna, Research Vice President, Software Development, IDC, underscore Java's continuing relevance for AI and broader application development needs.
"Java marked a significant milestone this year with its 30th anniversary, and the platform and language continues to evolve to help developers quickly and easily build applications infused with innovative AI and security capabilities. Java 25 highlights Oracle's ongoing investment in features and capabilities that power AI solutions and to simplify the language, making Java easier for new developers and IT teams to learn."
Georges Saab, Senior Vice President, Oracle Java Platform and Chair, OpenJDK Governing Board, speaks to the evolutionary nature of the platform and its accessibility for new developers.
"Since its inception 30 years ago, Java has remained a trusted and secure language for building large-scale enterprise applications. As highlighted at this year's JavaOne conference, Java is poised to expand its reach among novice developers and programming students. New features that simplify complexity and offer immediate feedback are making it easier to build beginner-level programs. Java's continued evolution reflects a thoughtful balance, broadening its accessibility to less experienced developers while preserving the robustness required for enterprise-grade solutions."
Adam Resnick, Research Manager, Modern Software Development and Developer Trends, IDC, identifies both the platform's long-standing position within the enterprise segment and its move to be more accessible for newer audiences.
Industry voices from the global Java community have also welcomed the new release. Trisha Gee, Head of Advocacy at Gradle, notes, "When Java moved to having a release every six months, it seemed impossible that interesting new features could be split into small enough pieces to deliver this way – and it felt like it was possible some releases might not even have much in them. How wrong we were! Each new Java release has interesting and useful features, and it has been a wonderful lesson in how to split up large deliverables into small, independent pieces. For example, the various pattern matching features stand alone and can be delivered independently, but all add up to a fantastic set of new features for Java and a new way for Java developers to think about how to solve their problems. Java keeps going from strength to strength."
Rémi Forax, Associate Professor, Université Gustave Eiffel, states, "JEP 512 introduces 'Compact Source Files and Instance Main Methods' which dramatically simplifies Java for beginners by allowing them to write programs without the traditional boilerplate code public static void main(String[] args). 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 full object-oriented programming."
Cay Horstmann, Professor Emeritus, San José State University, highlights, "My favorite parts of Java 25 are compact source files, instance main methods, and module import declarations, as these features create a low ceremony on-ramp to Java for beginning programmers. They also benefit experienced programmers, expanding the reach of Java to small, everyday tasks. I find it very satisfying to rewrite brittle shell or Python scripts in Java – an industrial-strength, strongly-typed language with great tool support."
Dr. Heinz M. Kabutz, author of The Java Specialists' Newsletter, comments, "When the six-month feature release cadence was announced with Java 9, I was one of the biggest skeptics, and even said so publicly. Would Oracle be able to pull it off? I had my doubts, as we had gotten used to a new release every three years. But indeed Oracle has pulled it off, and with gusto. Under Oracle's stewardship and with a huge community driving this forward, Java is leap-frogging other languages. Records, compact source files, and module imports make the on-ramp for Java so much easier, and virtual threads, foreign memory API, vector API, and ZGC make Java suitable for building technically advanced scalable systems."
Richard Fichtner, CEO of XDEV Software GmbH, adds, "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 much the language has evolved. Modern Java is more productive, safe, and innovative than ever - proof of what community and collaboration can achieve."
Cloud deployment and enterprise support
Java 25, in combination with Oracle Cloud Infrastructure, promises improved application performance and AI capabilities. Oracle Java SE Universal Subscription includes support features for managing large-scale deployments and security risks. The enhancements in Java 25 are the result of continued collaboration with the global Java developer community via OpenJDK and the Java Community Process.