How to Build Java Applications Today: #54
No surprises in Java 17 LTS, Oracle Java free in production again, Java LTS every 2 years, Eclipse IDE 2021–09, Spring Data 2021.0.5 & 2020.0.13.
README
Welcome to my weekly newsletter “How To Build Java Applications Today”! I read all the Java newsletters so you don’t have to! And it’s “Java news with a smile”.
If you like my newsletter, then subscribe to it on Substack! Or read it on dev.to, the Java Cafe, or Medium. Even better: Share it with people who may be interested.
Quote of the Week
So my working theory is that if you assemble enough enterprise software ads, an airport spontaneously forms around them.
Patrick Collison, co-founder of the online payment company Stripe, made these remarks in 2015. Do you still remember flying?!
Stand-Up
September 14 was the day we’ve all been waiting. But it didn’t go as expected, and we had all these questions afterwards: Where was the always-on display on the iPhone? Where was its satellite connectivity? And why didn’t the Apple Watch have this square redesign?
But enough about Apple’s iPhone event. That Tuesday also gave us Java 17, the new LTS version. No surprises there. But Oracle made two more announcements, and they were surprising. Read on to find out what they were about!
ADVERTISEMENT
22 YEARS OF FULL-STACK JAVA FOR HIRE NEXT FEBRUARY
I’m a full-stack Java developer with 22 years of experience: Spring Boot, Angular, Flutter. I’m looking for a project in February 2022, in Milton Keynes, London, or remote. I’ll work as a contractor or fixed-term employee but don’t take permanent positions.
Interested? Then check out my resume & work samples!
Check out my resume & work samples
Bookmarks
Java
No Surprises in Java 17 LTS
It’s here, precisely as expected back in early June (see issue #39):
It’s just bits ’n pieces unless you’ve got a Mac with Apple’s M1 chip - Java 17 will run natively there. […]
The (few?) among us who still use Java serialization get filters to make it more secure. The (even fewer) authors of “numerically sensitive libraries” can breathe easier with the restoration of always-strict floating point semantics. Random number generators get better, and sealed classes leave the incubator status behind (they were introduced in Java 15). And the small Venn diagram of “Java desktop program users” and “macOS users” gets a new rendering pipeline that uses Apple’s Metal framework.
Some incubating features see updates but aren’t final yet. That includes the pattern matching for
switch
, the foreign function and memory API for interaction with the world outside Java, and the vector API that supports very fast “compute engines” in modern CPUs.Oracle removes a lot in this release, too: The Security Manager, for instance, there since Java 1.0, will be deprecated. We can’t get to some JDK internal classes through the
-illegal-access
JVM parameter anymore. Few among us will probably miss the “experimental AOT and JIT compiler” or the Applet API (see section “The End of Applets” in issue 28).
Many of us will probably jump from Java 11 to Java 17, or even from Java 8. So here’s an excellent overview of what’s changed in Java from Java 8 all the way through 17.
How’s the IDE support? IntelliJ IDEA supports most (all?) new Java 17 features but plans to improve the support for pattern matching in switch
. Eclipse requires the latest 2021–09 release (see below) and a plugin. I don’t know if and how Visual Studio Code supports Java 17.
So where can you get it? Eclipse Temurin - the new name of AdoptOpenJDK - isn’t ready. Oracle is, both with Oracle Java and the Oracle OpenJDK builds. Now you may think: “Wait a minute, I can’t use Oracle Java in production without paying Oracle!” You’re not right anymore - see the following article.
Oracle Java Free in Production Again
Remember “Java is Still Free” from three years ago? Starting with Java 11, we couldn’t use Oracle Java for free in production anymore. But we could use Oracle OpenJDK for free.
So many Java developers switched to OpenJDK distributions that were free to use in production. You know, like AdoptOpenJDK (now with “Eclipse Adoptium” as the project name and “Eclipse Temurin” as the binary names): It had 22% market share in JRebel’s “Java Technology Report 2021” (876 responses in August-November 2020; see issue #27) and 44% market share in Snyk’s “JVM Ecosystem Report 2021” (over 2,000 responses in February-March 2021; see issue #41).
No matter which number you believe - I guess it was too high for Oracle. So last Tuesday Oracle also announced that starting with Java 17, Oracle Java is free for production again - with an asterisk. Oracle celebrated the occasion by creating a new software license. Yep, that’s what the world needs right now - a new software license. Insert your favorite “Oracle lawyers” joke here.
Anyhow, the Oracle Java license is called the “Oracle No-Fee Terms and Conditions” license (NFTC). “NFTC” sounds as if “Non-Fungible Token” (NFT) and “Near-Field Communication” (NFC) had a baby. Respect, Oracle, that’s a rather hip abbreviation for a company like you!
So what’s the asterisk I was talking about? Oracle will update an LTS release for free only one year after the next LTS release is out. If that’s not enough time for you to move to a new Java version, then Oracle is happy to take your money: “Oracle, for its part, will continue to offer the usual minimum of eight years of paid support for each LTS release.” Maybe another OpenJDK provides free updates longer than Oracle. We’ll see what happens in 2025 - or 2024…
Java LTS Every 2 Years?
Wait, why did the previous article end with “or 2024”? Because Oracle proposed, in another Tuesday announcement, that we should get a Java LTS release every 2 years instead of every 3! Why?
Mark Reinhold, Chief Java Architect, gave two reasons: First, new Java features will be adopted quicker than before. Secondly, this will increase the uptake of the non-LTS Java releases - I suppose because now there’d be only 3 of them instead of 5.
The general opinion is that non-LTS Java releases have a low pick-up. Just before Java 16 hit, Snyk’s “JVM Ecosystem Report 2021” (over 2,000 responses in February-March 2021; see issue #41) recorded Java 12 with 1% market share, Java 13 with 3%, Java 14 with 5%, and Java 15 with 12%. And these numbers are on the high end!
So, will this change happen? We don’t know. In the mailing list discussion, only Amazon voiced their support by now. What about Eclipse Adoptium? Microsoft? IBM/Red Hat? We’ll have to wait and see.
Releases
Eclipse IDE 2021–09
This quarterly release says “67 Projects” on its page - and then actually lists 67. Congratulations, Eclipse, on this amazing accomplishment: It said “70 Projects” last time but only listed 68. And that difference was already much improved: Release 2018–12 claimed 98 projects but only listed 81. Ouch!
So, what’s new?
This release supports Java 17 through a plugin. There isn’t much else specifically for Java developers, as the video shows: A “Raw paste” option, a quick fix to change a while
loop to a do … while
loop, a fix in the “Extract superclass” refactoring, a new code clean-up to replace StringBuilder
with StringBuffer
, and code completion hides rarely used classes by default now but includes Mockito argument matchers. There are three general improvements: The IDE starts faster, its dark theme looks better, and the Git history has more ways to navigate.
What isn’t new? The “New & Noteworthy” section is still a mess of seemingly random links: 27 sub-projects changed in this release, but only 20 are listed here - of which 12 haven’t changed, according to their version number. And the linked release notes still vary significantly in style & contents…
Spring Data 2021.0.5 & 2020.0.13
These libraries require the upcoming Spring Boot 2.5.4 and 2.4.11 releases. The Spring Boot releases will ship by the end of this week if the past is any indication. The Spring Data releases have bug fixes and dependency upgrades for the 15 (version 2021.0.5) / 16 (2020.0.13) sub-projects, all listed on the announcement page.
About
Karsten Silz is the author of this newsletter. He is a full-stack web & mobile developer with 22 years of Java experience, author, speaker, and marathon runner. Karsten got a Master’s degree in Computer Science at the Dresden University of Technology (Germany) in 1996.
Karsten has worked in Europe and the US. He co-founded a software start-up in the US in 2004. Karsten led product development for 13 years and left after the company was sold successfully. He co-founded the UK SaaS start-up “Your Home in Good Hands” as CTO in 2020. Since 2019, Karsten also works as a contractor in the UK.
Karsten has this newsletter, a developer website, and a contractor site. He’s on LinkedIn, Twitter, and GitHub. Karsten is also a Java news editor at InfoQ.