Oracle revs to Java 19 for speed and stability

The official distribution of Java 19 made its appearance today at Oracle’s JavaOne conference in Las Vegas. The new version folds in several key enhancements for simplifying the life of developers while speeding up some of the complex server-side tooling so it can take advantage of modern hardware, especially the most parallel options. 

If the version number of Java seems to be rising more quickly than in the past, that’s by design. Oracle is committed to rolling out new official versions of the language twice a year. Maintaining this rhythm makes it possible for new enhancements to work their way into the ecology and reach deployment. 

“We’re excited about this release,” said Georges Saab, senior vice president of development of Java at Oracle. “It is the 10th release that we will have done under the six-month cadence and we’ve been doing that now for about five years. We’re very pleased with the fact that all of those releases have come predictably, on target, on the date that they were supposed to. We’re really happy with the process that has given us for getting new features into the hands of Java developers more quickly.”

The programming language rivalry

Java is in competition with several other major programming languages for the hearts and minds of developers and the C-level executives who write the checks. The language has a reputation for being a bit wordy while delivering a rock-solid and fast performance across a wide variety of chips and architectures. 

Over the last decade, other languages like JavaScript, PHP and Python have gradually borrowed many of the successful ideas at the core of the Java stack. They now offer much better performance thanks to imitating some of the just-in-time compilation techniques of the Java virtual machine (VM). At the same time, they can offer a more modern syntax that is attractive to some developers, especially new ones learning the craft.

An open community and a closed enterprise version

The official version rollouts are becoming a bit more ceremonial. The enhancements have been in wide circulation for some time as experimental versions. Oracle wants to engage developers through what it calls the Java Community Process so that the language co-evolves with the needs of the developer community. Some of the most significant enhancements are tagged with words like “Preview” or “Incubator” to signal that they may change more rapidly than other, more stable parts of the codebase. 

“This comes from our dedication to building trust in the Java ecosystem,” explained Saab. “Things that are done in the open JDK community led by Oracle engineers and developers can see all of this work happening as it’s happening. They can read the mailing lists, understand, listen to the design discussions, and see each change in the code as it’s coming in.”

While Oracle continues to emphasize and nurture the open-source community of developers that’s grown around Java, they are also pushing a paid option for enterprise customers who are willing to pay for better performance and care. The Java SE Subscription option entitles paying customers to the GraalVM Enterprise version of the VM, as well as access to Java Management Service, a system for monitoring deployed code. 

Virtual threads and more improvements

Teams building out server-side stacks will want to evaluate the virtual threads and structured concurrency tools that are emerging from what Oracle called Project Loom. These virtual threads can be simpler to start up and shut down. In the past, Java’s standard model assigned one operating system thread to each incoming request to a server, an architectural model that allowed all of the requests to be processed independently. The problem, though, is that each thread consumes memory and the size of the RAM effectively limits the number of requests a server can handle.  

Lately, some simpler technologies like Node.js have won converts by avoiding the threading model, allowing them to handle much higher loads of simple requests with often dramatically less RAM. The new virtual threads make it possible for Java developers to match this performance. 

Another area that will draw attention will be the ability to reach out to new forms of hardware. First, Oracle will be rolling out a version of the Java VM for the RISC-V, a chip architecture that is found increasingly in some of the new, highly parallel chip designs. It’s not uncommon for some chip designers to talk of packing more than 1,000 RISC-V cores that can operate independently from each other. Java’s new VM makes it possible for Java developers to write code for this platform, which is expected to draw plenty of attention from artificial intelligence (AI) researchers who often want to use highly parallel chips like this to train AI models. 

At the same time, the new version of the language includes a vector API that makes it simpler for programmers to write code that will process large blocks of data in chunks. The Java VM will be able to assign these to the right cores in compatible hardware, making it possible for the code to run much faster when the right hardware is available. 

Some of the other new features include revisions to the Java language itself that simplify some of the syntax and also add more structure that can help prevent bugs. Java 19 marks the final rollout of some of the new ideas that were part of what Oracle calls Project Amber. New record patterns are now available in Java 19 as a preview. These can simplify creating and curating some of the data structures juggled by software. 

Oracle is also adding better tooling for connecting Java code with code written for other languages. They’re beefing up the foreign function interface, which makes it easier for programmers to create hybrid software packages that take advantage of the best features of different languages. 

Java platform: Both stable and evolving

While much of the focus will be on reaching the milestones for development, Oracle also wants to emphasize their continual devotion to creating an open community around the language. They understand that the decision to invest in software languages evolves over years and programmers crave a platform that is both stable and continually evolving to meet the latest needs. Oracle is investing as heavily in building this community as much as the software enhancements that come of the process. 

“We’ve reached our 1,000,000th certified Java developer and so that’s an exciting milestone,” said Chad Arimura, vice president for Java developer relations at Oracle. “We think that part of our technology and innovation strategy around trust, innovation, predictability — you know, important core values — we also think that applies to the community as well. Trust that there’s going to be a community around you, innovation and ensuring that we’re continuing to innovate the channels that we use to reach those developers, and predictability to ensure that we continue to invest in existing programs that Java developers can use.”

Originally appeared on: TheSpuzz