Oracle today announced the availability of Java 23, the latest version of the world’s number one programming language and development platform. Java 23 (Oracle JDK 23) delivers thousands of improvements to help developers increase productivity and drive innovation, while enhancements to the platform’s performance, stability, and security help organizations accelerate business growth.
“Java continues to evolve to support organizations’ increasingly diverse modern application development needs,” said Arnal Dayaratna, research vice president, software development, IDC. “The new release enables developers to expand their toolset and increase their productivity, helping them build and deliver applications that leverage the power of groundbreaking technologies such as AI. By delivering innovative new capabilities every six months, Java continues to help development teams add significant value to their organizations.”
In addition to the new enhancements and features for developers, Java 23 provides significant value to their organizations. For example, Java 23 is supported by the recent GA of Java Management Service (JMS) 9.0, an Oracle Cloud Infrastructure (OCI) native service that provides a unified console and dashboard to help organizations manage Java runtimes and applications on-premises or in any cloud. In addition, JMS 9.0 provides many usability improvements, and Oracle JDK 23 provides more options to fine-tune and improve peak performance with the addition of the Graal compiler, a dynamic just-in-time (JIT) compiler written in Java that transforms bytecode into optimized machine code.
“The new features in Java 23 help developers across all levels of expertise increase their productivity and streamline the development of high-performing, secure, and scalable applications,” said Georges Saab, senior vice president, Oracle Java Platform and chair, OpenJDK governing board. “With a wide range of new features and tools designed to help developers build and deliver applications faster and more efficiently, Java 23 helps development teams and their organizations boost innovation and drive increased business growth.”
Java 23 delivers improvements and enhancements to the Java language, runtime, libraries, and the tools included in the Java Development Kit (JDK). Significant updates delivered in Java 23 are:
Language Features via Project Amber
- JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview): Help increase Java programming productivity by making the language more uniform and more expressive. By helping to remove restrictions pertaining to primitive types that developers encounter when using pattern matching, instanceof, and switch, it enhances pattern matching by allowing primitive type patterns in all pattern contexts, and also extends instanceof and switch to work with all primitive types.
- JEP 476: Module Import Declarations (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 located in a package hierarchy.
- JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview): Help accelerate learning and skills development by offering a smooth on-ramp to Java programming to enable students to write their first programs without needing to understand language features designed for large programs. 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. In addition, experienced Java developers can write small programs succinctly without needing to use tools designed for larger projects.
- JEP 482: Flexible Constructor Bodies (Second Preview): Help developers increase productivity by allowing statements to appear before an explicit constructor invocation – such as super(..) or this(..). The statements cannot reference the instance under construction, but can initialize its fields before invoking another constructor, which makes a class more reliable when methods are overridden. This gives developers greater freedom to express the behavior of constructors and preserves the existing guarantee that constructors run in top-down order during class instantiation.
Libraries
- JEP 466: Class-File API (Second Preview): Helps developers improve productivity by providing a standard API for parsing, generating, and transforming Java class files.
- JEP 469: Vector API (Eighth 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. As a result, developers can achieve performance superior to equivalent scalar computations.
- JEP 473: Stream Gatherers (Second Preview): Helps developers improve productivity 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. By making stream pipelines more flexible and expressive and allowing custom intermediate operations to manipulate streams of infinite size, this feature enables developers to become more efficient in reading, writing, and maintaining Java code.
- JEP 480: Structured Concurrency (Third Preview): Helps developers improve the maintainability, reliability, and observability of multithreaded code by simplifying concurrent programming via a new API for structured concurrency. By consolidating groups of related tasks running in different threads into a single unit of work, structured concurrency can help eliminate common risks arising from cancellation and shutdown, such as thread leaks and cancellation delays.
- JEP 481: Scoped Values (Third 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.
Performance and Runtime Updates
- JEP 474: ZGC: Generational Mode by Default: Helps developers increase efficiency by switching the default mode of the Z Garbage Collector (ZGC) to the generational mode, which reduces the resources and maintenance costs required to support two different modes.
Tools
- JEP 467: Markdown Documentation Comments: Helps developers increase efficiency and productivity by enabling Javadoc documentation comments to be written in Markdown rather than solely in HTML and Javadoc @-tags. By gaining the ability to use Markdown syntax in documentation comments alongside HTML elements and JavaDoc tags, developers can more easily write and read API documentation comments in source form without adversely impacting the interpretation of existing documentation comments.
Stewardship
- JEP 471: Deprecate the Memory-Access Methods in sun.misc.unsafe for Removal: Provides developers with a streamlined toolset by helping them understand when their applications rely, directly or indirectly, on the memory-access methods in sun.misc.Unsafe, which is planned for removal in a future release.
The features in the Java 23 release are a result of continuous close collaboration between Oracle and other members of the worldwide Java developer community via OpenJDK and the Java Community Process (JCP). For more details on the features in Java 23, please read the Java 23 technical blog post.
Supporting the Global Java Community with Innovation in the Cloud
Java delivers increased performance, efficiency, cost savings, and innovation when deployed on OCI, which is one of the first hyperscale clouds to support Java 23. By delivering Oracle Java SE, Oracle GraalVM, and the Java SE Subscription Enterprise Performance Pack at no additional charge on OCI, Java 23 helps developers build and deploy applications that run faster, better, and with optimized cost-performance.
The Oracle Java Universal SE Subscription is an offering that provides customers with best-in-class support. It includes triage support for the entire Java portfolio, entitlement to Oracle GraalVM, the Java SE Subscription Enterprise Performance Pack, access to the advanced features of JMS, and the flexibility to upgrade at the pace of customers’ businesses. This helps IT organizations manage complexity, mitigate security risks, and contain costs.
In addition, Oracle recently announced at Oracle CloudWorld that Oracle Code Assist will be initially optimized for Java. Oracle Code Assist is an AI code companion that makes it easier to build Java applications, and the Oracle Code Assist service running on OCI will also be available for C, C++, Go, JavaScript, PL/SQL, Python, Ruby, and Rust.
JavaOne Returns in 2025
The flagship event for the global Java community, JavaOne, is returning to the San Francisco Bay Area in 2025. Taking place from March 17-20, 2025 in Redwood Shores, California, JavaOne 2025 will give attendees the opportunity to hear about the latest Java developments and interact with Oracle’s Java experts and industry luminaries. Read more via the blog post on Inside Java here, and if you are interested in presenting at JavaOne, please find the call for papers here.
Supporting Quotes
“Agile development helps ensure alignment with customer needs via feedback loops, and Java delivers the agility developers need,” said Venkat Subramanian, president, Agile Developer, Inc. “Among so many valuable features in Java 23, I’m particularly impressed by the evolution of stream gatherers. It is a feature that is incredibly useful for creating custom steps in a functional code development pipeline so that you can target specific business needs in an effective way.”
“I’ve been revising my introductory Java book using Java 23’s Implicitly Declared Classes preview features, and as an author and educator, these features make my work much easier,” said Barry Burd, professor, Drew University. “Much of the verbose code in previous editions has gone by the wayside, which helps students concentrate on essential logic instead of wading through lines of boilerplate text. In addition, since implicitly declared classes and instance main methods enables me to streamline the code examples in the book, there is now more room to include other interesting Java concepts. I’m excited to teach programming to my college students with Java 23.”
“At JetBrains, we strive to help developers consume and adopt new Java features in IntelliJ IDEA even before they are released to production, and this certainly applies to the IDE’s support for Java 23,” said Mala Gupta, Java developer advocate, JetBrains. “IntelliJ IDEA 2024.2 makes it easy for developers to leverage the highly innovative new features in Java 23, such as primitive types in patterns, implicitly declared classes, flexible constructor bodies, markdown documentation comments, and others.”
To learn more about Java and its global ecosystem, please visit:
- Dev.java: The official portal for learning Java
- Inside.java: News and views from the members of the Java Team at Oracle
- Java YouTube: The official Java YouTube channel for Java learning videos
Archive
- October 2024(44)
- September 2024(94)
- August 2024(100)
- July 2024(99)
- June 2024(126)
- May 2024(155)
- April 2024(123)
- March 2024(112)
- February 2024(109)
- January 2024(95)
- December 2023(56)
- November 2023(86)
- October 2023(97)
- September 2023(89)
- August 2023(101)
- July 2023(104)
- June 2023(113)
- May 2023(103)
- April 2023(93)
- March 2023(129)
- February 2023(77)
- January 2023(91)
- December 2022(90)
- November 2022(125)
- October 2022(117)
- September 2022(137)
- August 2022(119)
- July 2022(99)
- June 2022(128)
- May 2022(112)
- April 2022(108)
- March 2022(121)
- February 2022(93)
- January 2022(110)
- December 2021(92)
- November 2021(107)
- October 2021(101)
- September 2021(81)
- August 2021(74)
- July 2021(78)
- June 2021(92)
- May 2021(67)
- April 2021(79)
- March 2021(79)
- February 2021(58)
- January 2021(55)
- December 2020(56)
- November 2020(59)
- October 2020(78)
- September 2020(72)
- August 2020(64)
- July 2020(71)
- June 2020(74)
- May 2020(50)
- April 2020(71)
- March 2020(71)
- February 2020(58)
- January 2020(62)
- December 2019(57)
- November 2019(64)
- October 2019(25)
- September 2019(24)
- August 2019(14)
- July 2019(23)
- June 2019(54)
- May 2019(82)
- April 2019(76)
- March 2019(71)
- February 2019(67)
- January 2019(75)
- December 2018(44)
- November 2018(47)
- October 2018(74)
- September 2018(54)
- August 2018(61)
- July 2018(72)
- June 2018(62)
- May 2018(62)
- April 2018(73)
- March 2018(76)
- February 2018(8)
- January 2018(7)
- December 2017(6)
- November 2017(8)
- October 2017(3)
- September 2017(4)
- August 2017(4)
- July 2017(2)
- June 2017(5)
- May 2017(6)
- April 2017(11)
- March 2017(8)
- February 2017(16)
- January 2017(10)
- December 2016(12)
- November 2016(20)
- October 2016(7)
- September 2016(102)
- August 2016(168)
- July 2016(141)
- June 2016(149)
- May 2016(117)
- April 2016(59)
- March 2016(85)
- February 2016(153)
- December 2015(150)