JDK 19 release followed by Jakarta EE 10. But is it the new COBOL?

In a big week for Java, the Eclipse Foundation has released Jakarta EE 10, the platform once known as Java EE (Enterprise Edition).

This follows the release of JDK 19 a few days ago, though the two are not directly linked, and Jakarta EE 10 requires only Java SE 11 or higher. It also supports Java SE 17, which is the most recent long-term support release.

Although there was a Jakarta EE 9 in December 2020, it was almost entirely focused on the tedious and disruptive task of changing the namespace of the javax.* package to Jakarta.*. This was necessary because when Oracle donated Java EE to the Eclipse Foundation in 2019 (a move announced in 2017), it retained control of the Java brand name and trademark. There was also Jakarta EE 9.1 in May 2021, which supported Java SE 11 for the first time. Nevertheless, Jakarta EE 10 is the first major release since the Oracle donation.

Eclipse Director Mike Milinkovich told DevClass that it was not so much the technical enhancements, but rather the fact that this is the first major release to emerge from the Foundation’s work with the community. He said he sees it as reviving what “was a pretty moribund ecosystem back in 2017.”

He referenced a 35 percent increase in the number of members in the Jakarta EE working group, including Microsoft which joined last month, and the increase in the number of applications certified as Jakarta EE compatible.

“We changed the namespace and caused a fundamental modification that is forcing the entire ecosystem to change their products,” he said. “That was a big bet.” – though arguably it was not so much a bet, as something forced upon the community. “We’ve seen Jetty and Tomcat and Spring all commit to moving to the Jakarta namespace,” Milinkovich told us, mentioning three significant Java applications.

What can developers do with Jakarta EE 10 that they could not do before? “Things that come to mind are the enhancements to Java security, bringing OpenID Connect,” he said. “And modernising the CDI [Contexts and Dependency Injection], to have a CDI Lite that’s focused on build-time extensions, which was a key part of enabling the new Core Profile.” The Core Profile is a subset of Jakarta EE that targets small, lightweight runtimes designed for microservices.

In a new survey of just over 1400 Jakarta developers, better support for microservices was the second highest priority, the first being native integration with Kubernetes.

As for JDK 19, it is not an LTS release and will be supported only until March 2023. JDK releases now come every March and September, with a new LTS release once every two years, and the next LTS planned for JDK 21 in September 2023. There are plenty of new features in the release notes, including record patterns, a new API to native code called Foreign Function and Memory (also known as Project Panama), virtual threads and structured concurrency (also known as Project Loom), a performance-optimized Vector API, and pattern matching in the Switch statement. However all these features are in some level of preview or incubator status, and therefore unattractive for enterprise use.

“Technically there are no new features in it,” said Simon Ritter, Azul deputy CTO, speaking to DevClass. “We have this idea of preview features and incubator modules, where we add things to the Java platform but don’t make them final until people have had a chance to try them out.”

Project Loom is over four years old, why has it taken so long to implement? “It’s a big piece of functionality to introduce into the JVM,” said Ritter. “A scheduler and continuations, to get that right they needed to take the time.”

Dr. Venkat Subramaniam, founder of Agile Developer, Inc, added that it is “a change that touches almost every function in your library, a change that has an impact on any function that involves threading in any way … I think it’s prudent for them to wait on this as a preview. I would be surprised if it doesn’t go through more than two previews.”

Similar considerations apply to Project Panama, the other headline feature of JDK 19, which is a replacement for the JNI (Java Native Interface) that promises to be easier to use.

While these features are most welcome, does the slow pace of change mean that Java is becoming more of a reliable old workhorse than a cutting-edge language?

“Is Java the new COBOL? No, I don’t think so,” said Ritter. Subramaniam responded that “there’s a lot more to Java than just the language. I can’t imagine Java thriving as a language minus the JVM.”

Nevertheless, said Ritter, “when [Java inventor] James Gosling has talked about the language, he’s always said Java is a blue-collar language, about getting the job done.” Despite Java falling behind other languages in terms of cutting-edge features, enterprise developers will not be unhappy with that characterization.