Newsletters




Oracle Releases Java 24, Helping Organizations Accelerate Business Growth


Oracle is releasing Java 24, the latest version of the world’s number one programming language and development platform—delivering thousands of improvements to help developers maximize productivity and drive innovation.

Java 24 (Oracle JDK 24) offers enhancements to the platform’s performance, stability, and security to help organizations accelerate their business growth, Oracle said.

“Over the past 30 years, Java has provided developers with a comprehensive platform to build and deploy applications that address a diverse range of use cases,” said Georges Saab, senior vice president, Oracle Java Platform and chair, OpenJDK governing board. “With more than 20 new features spanning every element of Java, including new AI and post-quantum crypto capabilities, the Java 24 release gives developers the tools they need to build innovative, AI-infused applications. As the stewards of Java, we’re excited to work with the global Java community to continue delivering a steady stream of new features via our predictable, six-month cadence.”

New language features include:

  • JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview): Helps developers increase Java programming productivity by making the language more uniform and expressive. This feature helps developers enhance pattern matching by removing restrictions pertaining to primitive types that developers encounter when using pattern matching, instanceof, and switch
  • JEP 492: Flexible Constructor Bodies (Third Preview): Helps developers improve the reliability of code via the introduction of two distinct prologue and epilogue phases in a constructor body. This enables developers to more naturally place logic that they currently must factor into auxiliary static methods, auxiliary intermediate constructors, or constructor arguments.
  • JEP 494: Module Import Declarations (Second Preview): Helps developers improve productivity by enabling them to quickly and easily import all the packages exported by a module, without requiring the importing code to be in a module itself. This simplifies the reuse of modular libraries for all developers and helps beginners more easily use third-party libraries and fundamental Java classes without needing to learn where they are in a package hierarchy.
  • JEP 495: Simple Source Files and Instance Main Methods (Fourth Preview): Helps students write their first programs without needing to understand language features designed for large programs by offering a smooth on-ramp to Java programming. As a result, educators and instructors can introduce concepts gradually, and students can write streamlined declarations for single-class programs and seamlessly expand their programs with more advanced features as their skills grow.

Additional libraries include:

  • JEP 485: Stream Gatherers: Helps developers become more efficient in reading, writing, and maintaining Java code by enhancing the Stream API to support custom intermediate operations, which allow stream pipelines to transform data in ways that are not easily achievable with existing built-in intermediate operations.
  • JEP 484: Class-File API: Helps developers improve productivity by providing a standard API for parsing, generating, and transforming Java class files and tracking the class file format defined by the Java Virtual Machine specification.
  • JEP 487: Scoped Values (Fourth Preview): Helps developers increase the ease-of-use, comprehensibility, performance, and robustness of their projects by enabling the sharing of immutable data within and across threads.
  • JEP 489: Vector API (Ninth Incubator): Helps developers improve productivity by introducing an API to express vector computations that reliably compile at runtime to vector instructions on supported CPU architectures.
  • JEP 499: Structured Concurrency (Fourth Preview): Helps developers improve the maintainability, reliability, and observability of multithreaded code by simplifying concurrent programming via a new API for structured concurrency.

Performance and runtime updates include:

  • JEP 450: Compact Object Headers (Experimental): Helps developers increase productivity by reducing the size of object headers in the HotSpot JVM between 96 and 128 bits down to 64 bits on 64-bit architectures. This helps reduce heap size, improve deployment density, and increase data locality.
  • JEP 475: Late Barrier Extension for G1: Helps developers increase efficiency by shifting the expansion of the G1 garbage collector's barriers from early in the C2 JIT's compilation pipeline to later, which can reduce overhead if it occurs after platform-independent optimizations and register allocation. By simplifying the implementation of the G1 garbage collector's barriers, this feature helps increase the efficiency, comprehensibility, resiliency, and quality of C2-generated code.
  • JEP 483: Ahead-of-Time Class Loading & Linking: Helps developers increase productivity and improve startup time by making classes of an application instantly available in a loaded and linked state when the HotSpot Java Virtual Machine starts. This feature does not require the use of the jlink or jpackage tools, and it does not require any change to how applications are started from the command line or any change to the code of applications, libraries, or frameworks. As a result, it helps lay a foundation for continued improvements in startup and warmup time.
  • JEP 490: ZGC: Remove the Non-Generational Mode: Helps developers reduce the maintenance cost of supporting two different modes by removing the non-generational mode of the Z Garbage Collector (ZGC).
  • JEP 491: Synchronize Virtual Threads without Pinning: Helps developers increase productivity by extending the scalability of Java code and libraries that use synchronized methods and statements. By enabling virtual threads to release their underlying platform threads, this feature gives developers access to more virtual threads to manage their applications’ workloads.

In addition, by introducing modern, safe features while gradually deprecating and removing unsafe features, Oracle underscores its commitment to maintaining the integrity of Java and aligning with software development best practices, according to the company.

Oracle has designated three features for removal in a future Java release: JEP 472: Prepare to Restrict the Use of JNI; JEP 486: Permanently Disable the Security Manager; and JEP 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe.

The features in the Java 24 release are a result of continuous collaboration between Oracle and other members of the global Java developer community via OpenJDK and the Java Community Process (JCP).

For more details on the features in Java 24, visit the Java 24 technical blog post.

For more information about this news, visit www.oracle.com


Sponsors