How to Build Java Applications Today: #54
Tags: java, bpf
Published: 2021-09-20 21:32:01

## TL;DR
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](https://bpfnl.substack.com)! Or read it on [dev.to](https://dev.to/ksilz/series/11995),  the [Java Cafe](https://thejavacafe.com/ksilz/series/1), or [Medium](https://ksilz.medium.com). 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](https://twitter.com/patrickc/status/591724846280679426), co-founder of the [online payment company Stripe](https://en.wikipedia.org/wiki/Stripe_(company)), 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](https://youtu.be/Sq0iC-vsl2k). 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 ](https://ksilz.com/)**

***

## Bookmarks
### Java
#### No Surprises in Java 17 LTS
It's here, precisely as expected back in early June (see [issue #39](https://bpfnl.substack.com/p/how-to-build-java-applications-today-068)):

>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](https://openjdk.java.net/jeps/415). The (even fewer) authors of “numerically sensitive libraries” can breathe easier with the [restoration of always-strict floating point semantics](https://openjdk.java.net/jeps/306). Random number generators [get better](https://openjdk.java.net/jeps/356), and [sealed classes](https://openjdk.java.net/jeps/409) leave the incubator status behind (they were [introduced in Java 15](https://betterprojectsfaster.com/blog/weekly-links-2020-10-22/#jdk-15-sealed-classeshttpsfoojayioblogjdk-15-sealed-classes)). And the small [Venn diagram](https://en.wikipedia.org/wiki/Venn_diagram) of “Java desktop program users” and “macOS users” gets a [new rendering pipeline](https://openjdk.java.net/jeps/382) that uses Apple’s Metal framework.
>
>Some incubating features see updates but aren’t final yet. That includes the [pattern matching for `switch`](https://openjdk.java.net/jeps/406), the [foreign function and memory API](https://openjdk.java.net/jeps/412) for interaction with the world outside Java, and the [vector API](https://openjdk.java.net/jeps/414) 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](https://openjdk.java.net/jeps/411). We [can’t get to some JDK internal classes](https://openjdk.java.net/jeps/403) through the `-illegal-access` JVM parameter anymore. Few among us will probably miss the “[experimental AOT and JIT compiler](https://openjdk.java.net/jeps/410)” or the [Applet API](https://openjdk.java.net/jeps/398) (see section “The End of Applets” in [issue 28](https://bpfnl.substack.com/p/how-to-build-java-applications-today-762)).

Many of us will probably jump from Java 11 to Java 17, or even from Java 8. So here's an [excellent overview](https://advancedweb.hu/a-categorized-list-of-all-java-and-jvm-features-since-jdk-8-to-17) of what's changed in Java from Java 8 all the way through 17.
 
How's the IDE support? IntelliJ IDEA [supports](https://blog.jetbrains.com/idea/2021/09/java-17-and-intellij-idea/) 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](https://marketplace.eclipse.org/content/java-17-support-eclipse-2021-09-421). 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](https://github.com/adoptium/adoptium/issues/74). Oracle is, both with [Oracle Java](https://www.oracle.com/java/technologies/downloads/) and the [Oracle OpenJDK builds](https://jdk.java.net/17/). 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.

**[InfoQ article](https://www.infoq.com/news/2021/09/java17-released/)**

***

#### Oracle Java Free in Production Again

Remember "[Java is Still Free](https://medium.com/@javachampions/java-is-still-free-c02aef8c9e04)" from three years ago? Starting with Java 11, we couldn't use Oracle **Java** [for free in production anymore](https://www.azul.com/blog/eliminating-java-update-confusion/). 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](https://projects.eclipse.org/projects/adoptium)" as the project name and "[Eclipse Temurin](https://adoptium.net/)" 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](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4b3)) and 44% market share in Snyk's "JVM Ecosystem Report 2021" (over 2,000 responses in February-March 2021; see [issue #41](https://bpfnl.substack.com/p/how-to-build-java-applications-today-5ca)). 

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](https://www.oracle.com/downloads/licenses/no-fee-license.html)" license (NFTC). "NFTC" sounds as if "[Non-Fungible Token](https://en.wikipedia.org/wiki/Non-fungible_token)" (NFT) and "[Near-Field Communication](https://en.wikipedia.org/wiki/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](https://mreinhold.org/blog/forward-even-faster): "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…

**[Announcement](https://blogs.oracle.com/java/post/free-java-license)**

***

#### 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](https://bpfnl.substack.com/p/how-to-build-java-applications-today-5ca)) 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](https://mail.openjdk.java.net/pipermail/discuss/2021-September/005945.html), only Amazon [voiced their support](https://mail.openjdk.java.net/pipermail/discuss/2021-September/005950.html)  by now. What about Eclipse Adoptium? Microsoft? IBM/Red Hat? We'll have to wait and see.

**[Blog post](https://mreinhold.org/blog/forward-even-faster)**

***

### Releases
#### Eclipse IDE 2021-09
This quarterly release says "67 Projects" on [its page](https://www.eclipse.org/eclipseide/2021-09) - and then actually [lists 67](https://projects.eclipse.org/releases/2021-09). Congratulations, Eclipse, on this amazing accomplishment: It said "70 Projects" [last time](https://www.eclipse.org/eclipseide/2021-06/) but only [listed 68](https://projects.eclipse.org/releases/2021-06). And that difference was already **much improved**: [Release 2018-12](https://www.eclipse.org/eclipseide/2018-12/) claimed 98 projects but only [listed 81](https://projects.eclipse.org/releases/2018-12). Ouch!

So, what's new? 

This release supports Java 17 through [a plugin](https://marketplace.eclipse.org/content/java-17-support-eclipse-2021-09-421). There isn't much else specifically for Java developers, as the [video shows](https://youtu.be/_OkIpz__Fyk): 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…

**[Release page](https://www.eclipse.org/eclipseide/2021-09)**

***

#### 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.

**[Announcement](https://spring.io/blog/2021/09/17/spring-data-2021-0-5-and-2020-0-13-released)**

***

## 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](https://yourhomeingoodhands.co.uk/)" as CTO in 2020. Since 2019, Karsten also works as a contractor in the UK.

Karsten has [this newsletter](https://bpfnl.substack.com/), a [developer website](https://betterprojectsfaster.com/), and a [contractor site](https://ksilz.com/). He's on [LinkedIn](https://www.linkedin.com/in/ksilz/), [Twitter](https://twitter.com/karsilz), and [GitHub](https://github.com/ksilz). Karsten is also a [Java news editor at InfoQ](https://www.infoq.com/profile/Karsten-Silz).