TNS
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Java / Programming Languages / Software Development

Oracle Unveils Java 23: Simplicity Meets Enterprise Power

Oracle's latest Java release boosts developer productivity with AI integration, simplified syntax for beginners, and performance enhancements for enterprise applications.
Sep 17th, 2024 1:01pm by
Featued image for: Oracle Unveils Java 23: Simplicity Meets Enterprise Power
Featured image via Unsplash+.

Oracle today announced the general availability (GA) of Java 23, the latest version of the Java programming language and development platform.

Oracle’s Java Development Kit 23 (Oracle JDK 23) delivers thousands of improvements to help developers increase productivity and enhance the platform’s performance, stability and security.

Key Features

The new release introduces several language features, library updates, and tools to streamline Java development.

Key points include:

  • 12 JDK Enhancement Proposals (JEPs) delivered.
  • New language features from Project Amber.
  • Library improvements including updates to APIs and concurrency tools.
  • Performance enhancements, particularly in garbage collection.
  • Introduction of Markdown support for documentation comments.

“Java continues to evolve to support organizations’ increasingly diverse modern application development needs,” said Arnal Dayaratna, research vice president for software development at IDC, said in a statement. “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, 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.

Preview Features

Java 23 includes a lot of previews and incubator features. That means the APIs aren’t guaranteed not to change, Andrew Cornwall, an analyst at Forrester Research, told The New Stack.

However, Cornwall cited that a lot of the updates indicate future directions:

  • Language changes simplify Java programming and eliminate some of the traditional warts in Java. Better support for primitive types instead of objects, allowing code before the super() or this() in a constructor, entire module imports rather than the traditional mob of import statements at the top of every .java file. Implicit classes allow beginners to get going more quickly.
  • Runtime changes make Java better suited for enterprises. Better garbage collection in ZGC and the inclusion of Graal JIT EE technology in the Oracle JDK will lead to faster and more parallel execution.
  • Class library changes support the Vector API (SIMD) and structured concurrency for better parallelization on the enterprise cloud, and which removes support for technology that will hold Oracle back (sun.misc.Unsafe). Oracle has said they want Java to displace Python as the language for AI, and these changes are part of a package that’s needed to do that.

“In short, Java 23 is an incremental release rather than a major milestone,” Cornwall said. “It’s making changes to improve developer quality of life and eliminate older incompatible technologies. It feels as if Oracle is cleaning things up before the next big release.”

Oracle Foundational Java Projects:

Many of the new features come from Oracle’s key Java project areas:

  • Loom: Focuses on concurrency, including virtual threads and structured concurrency.
  • Panama: Aims to improve native code function calls and memory access.
  • Amber: Concentrates on language changes to make Java more concise and data-oriented.
  • Valhalla: Works on improving startup and warm-up times.
  • Babylon: A new project introducing code reflection, with initial focus on GPU programming.

“The new features in Java 23 help developers across all levels of expertise increase their productivity and streamline development,” said Georges Saab, senior vice president, Oracle Java Platform and chair, OpenJDK governing board, said in a statement.

Java 23 delivers improvements and enhancements to the Java language, runtime, libraries, and the tools included in the Java Development Kit (JDK).

Meanwhile, “the preview system has worked very well as we’re delivering the right thing after some feedback,” Chad Arimura, Oracle’s vice president of Java Developer Relations, told The New Stack. “And almost every one of the things that’s gone into preview has made small, incremental changes before they went final based off some feedback that we received.”

New Language Features

According to Oracle documentation, new language features via Project Amber include:

  • 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 switches 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.

“For developers, JDK 23 is mostly about the continued evolution of the platform through preview features and incubator modules, Simon Ritter, deputy CTO at Azul, told The New Stack. “The inclusion of JEP 455, Primitive types in patterns, instanceof and switch extends the work of Project Amber to deliver productivity-oriented Java language features. Other features like Stream Gatherers (JEP 473) and Markdown Documentation Comments (JEP 467) demonstrate the further evolution of the Java platform in a controlled way.”

Meanwhile, Dayaratna said he has three key takeaways regarding the new release:

  1. Improved scalability and resource efficiency with virtual threads that reduce costs and improve high-performance application development.
  2. Faster, more maintainable code with pattern matching for switch that accelerates feature delivery and reduces long-term technical debt.
  3. Seamless integration with native libraries via the Foreign Function and Memory API that boosts performance for data-intensive applications without requiring code rewrites.

Virtual Threads improve scalability and resource efficiency with virtual threads that reduce infrastructure costs and streamline the development of high-performance applications. This enhancement accelerates time-to-market in sectors like finance and e-commerce, Dayaratna said.

Java 23 provides “improved scalability and resource efficiency with virtual threads that reduce costs and improve application scalability,” he said.

Pattern Matching for switch (Preview) enhances developer productivity, reduces code complexity and improves readability. This leads to faster development cycles and lower maintenance costs while simplifying the management of growing codebases.

With pattern matching for switch, you get “faster, more maintainable code, which accelerates feature delivery and reduces technical debt,” Dayaratna said.

The Foreign Function and Memory API (Fourth Preview) enables seamless integration with high-performance native libraries that boosts performance for data-heavy tasks like machine learning and data processing. It minimizes integration issues and avoids the need for rewriting critical code, he said.

Making It Easier for Beginners

Oracle also has simplified Java for beginners. The company has made efforts to make Java more accessible for new learners, including simplified syntax for basic programs. In addition, Oracle has developed a VS Code plugin to attract younger and hobbyist developers, and the company has introduced a Java Playground for in-browser coding and learning.

“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, a professor in the Department of Mathematics and Computer Science at Drew University, said in a statement. “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.

GenAI Is Coming, JavaOne Coming Back

Meanwhile, to help Java developers via GenAI, 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.

Finally, Oracle announced that the bellwether event for the global Java community, JavaOne, is taking place from March 18-20, 2025, in Redwood Shores, California.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Fourth.
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.