With the general availability of Java 17, Oracle not only delivered the latest version of the popular programming language and development platform, but the company also provided developers with the latest long-term support (LTS) release under Java’s six-month release cadence
Java 17 delivers thousands of performance, stability, and security updates, as well as 14 new JEPs (JDK Enhancement Proposals) to help developers be more productive, said Georges Saab, vice president of software development for the Java Platform Group at Oracle.
LTS for the Win
But it’s the LTS part of the news that stands out because many large enterprises, particularly conservative ones, are reluctant to move to the six-month interim releases but are more confident in an LTS version because of the assured support from Oracle.
“I think that what we’re going to see with Java 17 is developers that have been waiting a long time to say, okay, my business is ready to migrate to the next LTS,” said Dalia Abo Sheasha, a Java Developer Advocate at JetBrains.
“And the people that are on [Java] 11, are going to have a lot easier time to go to 17 than the people that are on [Java] eight,” she said, referring to the previous LTS version of Java. “But I think the people that are on eight are going to learn a lot of lessons from the people that went to 11 already.”
Java 8 continues to be the most popular version of Java in use today. In its 2021 survey on the State of the Developer Ecosystem report, JetBrains said 72% of respondents to its survey said they use Java 8, 42% said they use Java 11, and next was Java 15 with 14%. Meanwhile, the recent Eclipse Foundation Jakarta EE Developer Survey Report indicated that the use of Java 11 surged among survey respondents from 28% in 2020 to 58% this year.
LTS Release Cadence
Meanwhile, Saab said Oracle has proposed that the next LTS release should be Java 21 and made available in September 2023, which will change the ongoing LTS release cadence from three years to two years.
“I think this is a pretty big step for Oracle and the Java community at large because in moving LTS from three to two years, they’re saving enterprises from having to delay their adoption of new features,” said Brad Shimmin, an analyst at Omdia. “This move in conjunction with their decision to include an offer to run Oracle JDK for free without support with one year as an overlap with the next release, lets users explore new features and build those into their long-term deployment plans with greater freedom and frequency.”
Saab noted that in terms of the total throughput of feature content, Oracle is “basically delivering on the same order of magnitude that we were in major (LTS) releases before in about the same period of time.”
The last LTS release of Java was Java 11 (also known as JDK — Java Development Kit –11) in September of 2018. The LTS version prior to that was JDK 8 in March of 2014. However, starting with JDK 14 in September of 2017, Oracle began releasing new versions of Java at a six-month cadence.
The multiyear periods between releases “just wasn’t right for Java,” he said.
The faster release cycle enables Oracle to deliver more features more quickly. Some new features come in the form of incubator modules and some as previews, which are a way for Oracle to introduce new features to the platform without making them set in stone, he said. That way Oracle can get feedback from the Java community about what developers like or dislike about the feature and whether it needs to be tweaked.
Indeed, the community had an impact on the final release of Java 17. For instance, in Java 17, of the 2,645 JIRA issues marked as fixed, 1,774 were completed by Oracle, while 871 were contributed by other members of the Java community, said Sharat Chander, director of Java SE Product Management at Oracle, in a blog post.
“If people provide feedback and say that maybe that feature could be a little bit different, maybe something could be improved,” Ritter said. “We’ve seen that happen several times with different features that have been added as preview features. And that wouldn’t have been possible in the old multiyear release cycle. So, definitely, the six-month idea is working very, very well.”
Meanwhile, the faster LTS cycle is good for developers because it means that the features that they love and want to use, if they’re in a conservative enterprise, they’re going to be able to use earlier, Saab said.
“And I think it’s also going to increase the attractiveness of the six-month releases because typically what we see is when people have something in production on an LTS, they may take a long time to think about and consider moving forward to the next LTS,” he said. “However, for their next project that isn’t out there in production yet, they are trying to make a choice.”
Shortening the Java LTS cycle makes that choice easier, he argued. For developers in conservative enterprise organizations that move slowly to change, “If I’m a developer in that situation, by the time I’m going into production a year from now, there’s going to be a new LTS,” Saab said. “And so, I have a chance as a developer to convince my organization that, in fact, we can be a little more aggressive.”
New Licensing Terms
In addition to the new cadence for LTS versions of Java, Oracle also changed its licensing terms for Java SE.
Oracle JDK 17 and future JDK releases are released under a free-to-use license until a full year after the next LTS release, Oracle said. Oracle will also continue providing Oracle OpenJDK releases under the open source General Public License (GPL), as it has since 2017, Saab said.
“Oracle JDK 17 is free for everyone, is the bottom line,” said Donald Smith, Group Director, Java Platform Product Management, at Oracle.
Moreover, Java SE subscription customers can migrate to Java 17 at the pace that best meets their needs. Oracle will provide customers with security, performance, and bug-fix updates for Java 17 through at least September 2029, the company said. So, there will be a minimum of eight years of LTS support under the Java SE subscription.
However, Stephen Colebourne, engineering lead at OpenGamma, project lead at Joda.org and an Oracle Java Champion, said in a tweet, “A few days ago I thought the new Oracle JDK 17 no-fee license was a Good Thing. I increasingly think it is more of a shiny new trap, with lots of subtle ways prod code might breach it. I’d *strongly* advise sticking with a non-Oracle JDK at this point (eg. Adoptium/Corretto).”
A few days ago I thought the new Oracle JDK 17 no-fee license was a Good Thing. I increasingly think it is more of a shiny new trap, with lots of subtle ways prod code might breach it. I’d *strongly* advise sticking with a non-Oracle JDK at this point (eg. Adoptium/Corretto). https://t.co/5uxZpo0N6d
— Stephen Colebourne (@jodastephen) September 20, 2021
Oracle is offering JDK 17 under a license that is free to use for not only development and tests but also for production use for a period of time that extends until a year after the next LTS is available, Saab said.
In addition, “We’re going to have a long-term stream of the Oracle JDK binaries that are under a commercial license that allows use in development and test but not in production,” he said.
Features in JDK 17
Key new features in Java 17 include Sealed Classes, macOS AArch64 support, Context-Specific Deserialization Filters, and Enhanced Pseudo-Random Number Generator. Also in the release in preview or incubator mode are Pattern Matching for switch (preview), Foreign Function & Memory API (incubator) and Vector API (second incubator). Sealed Classes was introduced in preview in Java 15.
Calling out features that stood out to him — both new in Java 17 and previously introduced in interim releases — Ritter listed text blocks, pattern matching for instanceof, records, sealed classes, pattern matching on switch and the switch expression.
“The new ARM 64bit approach on Apple will help keep Java relevant for Apple developers. And enterprises really like the long-term support approach that Oracle offers with LTS,” said Holger Mueller, an analyst at Constellation Research. “This is yet another major push from Oracle for Java with version 17. No surprise, Java runs better in Oracle Cloud, an interesting and legitimate move by Oracle.”
Indeed, the Java Management Service, included in the Java SE subscription, is an Oracle Cloud Infrastructure (OCI) service to help users track Java usage and manage Java runtimes and applications on-premises or on any cloud. The JDK 17 subscription also includes GraalVM Enterprise.
The Java Management Service gives users visibility into their Java deployments across the enterprise, spanning all the Java versions installed in their environment, including versions of Java running in development and in production. It also checks if all installed Java versions are up to date with the latest security patches.
Meanwhile, regarding the specific features, sealed classes and interfaces restrict which other classes or interfaces may extend or implement them. This feature comes from Oracle’s Project Amber, which aims to increase developer productivity by evolving the Java language.
The macOS AArch64 Port ports the JDK to the macOS/AArch64 platform to enable Java applications to run natively on the new Arm 64-based Apple Silicon computers.
And the Pattern Matching for switch feature now in preview, allows an expression to be tested against several patterns, each with a specific action, so that complex data-oriented queries can be expressed concisely and safely.
Oracle is a sponsor of The New Stack.