How to Build Java Applications Today: June 28, 2021
Tags: java, bpf
Published: 2021-06-28 21:44:01

## TL;DR
Java applications in Windows 11 app store, Scala 3, Jakarta EE 10, Kotlin 1.5.20, Eclipse GlassFish 9.2, a lot of Spring releases, Iron Cowboy.

***

## README
This is **issue 42** of 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
*‌Everyone has a plan 'till they get punched in the mouth.*
[Myke Tyson](https://www.brainyquote.com/quotes/mike_tyson_382439), [US boxer](https://en.wikipedia.org/wiki/Mike_tyson), gives us an earful of practical philosophy.

***

## Stand-Up
At the ripe age of 50, I ran my [first marathon](https://mkmarathon.com/mk-marathon/) yesterday: [3:53:38h](https://resultsbase.net/event/5809/results/3294285). I had near-ideal conditions with a flat course and “British sunshine” (>10 degrees Celsius/50 degrees Fahrenheit, cloudy, no rain). Honestly, I couldn’t do this again today. Why? Because I turned 51 today! That, and I can’t run two marathons back-to-back. 

Why do I run marathons? I did track & field while in school, though no running. A couple of years ago, I pondered running as a sport. So I asked my wife: “Honey, it’s either running, a motorbike, or an affair”. Of course, I was just kidding about one of these options: A motorbike?! What am I - a dentist in a midlife crisis?! An organ donor on wheels? So we settled on running. 

Now before I get too chuffed with myself: Check out the new “And Now for Something Completely Different” section at the end for some truly spectacular achievements.

***

## Code Review
### Issue 41 from June 21, 2021
#### snyk JVM Ecosystems Report 2021
[Last week](https://bpfnl.substack.com/p/how-to-build-java-applications-today-5ca) I wrote about the Snyk study that’s based on a developer survey. Now Snyk has an [open-source tool that scans our build files for security vulnerabilities](https://snyk.io/product/open-source-security-management/). So 
I asked Snyk to use data collected by that tool instead of a survey to tell us what frameworks and  build tools we use. 

That was 50% percent stupid of me, as Brian Vermeer, developer advocate at Snyk, [pointed out](https://twitter.com/BrianVerm/status/1407220145945296902): The study **has that data already** for build tools (page 21 in the PDF). I’m sorry for this mistake!

I also think that this comment on the study was a cheap shot: “Don’t ask me why it took three months to publish”. It took JRebel also three months to publish their study. And this is probably a side project for Brian, with two articles from other companies (meaning more coordination). I’m sorry again for being a jerk here.

***

#### Spring Native 0.10.0
Spring Native uses GraalVM to turn Spring Boot applications into native images. My report about the release included a [video from the Quarkus team](https://youtu.be/jjwbtmjcyu4?t=16). It showed how Spring Boot used 126 MB in a test when compiled natively - vs. 15 MB for Quarkus.

It looks like the Spring team is aware of these deficiencies: They’re [hiring a developer](https://twitter.com/sdeleuze/status/1407331230618685451?s=20) to work on Spring Native. Better late than never, I guess! Let’s see what results Spring Native will achieve with Spring Boot 3 (???) this fall. I’m sure the Quarkus guys will check that!

[Job ad tweet](https://twitter.com/sdeleuze/status/1407331230618685451?s=20)

***

## Bookmarks
### Java
#### Java Applications in Windows 11 App Store
Last week, Microsoft announced Windows 11. It’s a 64-Bit only UI refresh with enhancements for the app store & gaming that can also run Android apps (from the [Amazon app store](https://www.amazon.com/gp/mas/get/amazonapp), **not** the [Google one](https://play.google.com/store/apps?hl=en_US&gl=US)). The Verge [has the details](https://www.theverge.com/2021/6/24/22546791/microsoft-windows-11-announcement-features-updates).

Here’s what’s interesting to us Java developers: We can put our Java applications into the Windows 11 app store! Now before we get too excited, let’s remember that we mostly build **business** applications. And business PCs are typically locked down so that users can’t install applications, app store or not. Still, we appreciate the gesture from the company that once built “[Visual J++](https://en.wikipedia.org/wiki/Visual_J%2B%2B)”!

When will Windows 11 ship? 

According to [Microsoft](https://www.microsoft.com/en-us/windows/windows-11), new PCs with Windows 11 will ship “later this year” (read: holiday season). And we can upgrade from Windows  10 to 11 “sometime in early 2022” if our PC is up for that (this [Microsoft tool](https://aka.ms/GetPCHealthCheckApp) checks that).

[Microsoft app store announcement](https://blogs.windows.com/windowsexperience/2021/06/24/building-a-new-open-microsoft-store-on-windows-11/)

***

#### Scala 3: Functional Programming, Revamped
Arguably, many of us still struggle with object-oriented programming. No wonder that functional programming hasn’t gone mainstream! But if you’re into functional programming, then Scala is your language of choice on the JVM. And after eight years of work, the Scala team [released version 3.0](https://www.scala-lang.org/blog/2021/05/14/scala3-is-here.html): A "[game changer](https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html) [...] that will greatly improve the day-to-day experience of every Scala programmer". 

I’ve never used Scala, so I can’t appraise these modest claims. Here’s what’s new: The [syntax is more concise](https://docs.scala-lang.org/scala3/new-in-scala3.html#new--shiny-the-syntax), the language has [new features](https://docs.scala-lang.org/scala3/new-in-scala3.html#opinionated-contextual-abstractions), they improved the [type system](https://docs.scala-lang.org/scala3/new-in-scala3.html#say-what-you-mean-type-system-improvements) and [object-oriented programming](https://docs.scala-lang.org/scala3/new-in-scala3.html#re-envisioned-object-oriented-programming), added [metaprogramming tools](https://docs.scala-lang.org/scala3/new-in-scala3.html#batteries-included-metaprogramming) and [compiler options](https://docs.scala-lang.org/scala3/guides/migration/options-new.html).

If you use Scala: Congratulations, you’re braver than I am! Please read the [migration guide](https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html#). And you’ll be happy to know that Scala 3 can use [Scala 2 libraries](https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html#a-scala-3-module-can-depend-on-a-scala-213-artifact). It even works the [other way around](https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html#a-scala-213-module-can-depend-on-a-scala-3-artifact)!

More details are in my InfoQ article. Yep, this is another case I where rip-off myself. Although I prefer the term “recycle”. 

[My InfoQ article](https://www.infoq.com/news/2021/06/scala-3-overhaul/)

***

### Frameworks & Libraries
#### Jakarta EE 10: Q1/2022 & Java 11
Jakarta EE 9.1 (Jakarta 9 + Java 11) was released a month ago (see section “Jakarta EE 9.1” in [issue 38](https://bpfnl.substack.com/p/how-to-build-java-applications-today-92f)). I completely missed that three months ago, a member of the Jakarta EE team [already spilled the beans](https://blogs.oracle.com/javamagazine/java-jakartaee-cdi-ejb-jsf-tijms) on what to expect for Jakarta EE 10. A fellow writer at InfoQ [reminded me](https://www.infoq.com/news/2021/06/jakarta-ee-9-1/). So here are the plans for Jakarta EE 10. 

All parts of Jakarta will use a unified dependency injection component, which will also change many existing annotations. Jakarta Server Faces 4.0 will drop already deprecated legacy functionality and may get a simple REST lifecycle. The Jakarta Security API will get new authentication mechanisms (possibly `Client-Cert` and `Digest`) and may get custom authorization rules. The Jakarta REST API will deprecate the Java Architecture for XML Binding (JAXB). The configuration of the Jakarta Concurrency API will become standardized (it currently is container-specific).

It’s uclear whether pending changes from other APIs will make it into Jakarta EE 10 (Jakarta Persistence and  Jakarta Messaging are examples). Also unknown: Will new APIs make it, such as NoSQL, Model View Controller, caching, or configuration?

Jakarta 10 is currently planned for Q1/2022. It will use Java 11 as the source & binary level, though implementations are free to support more recent Java versions (such as the upcoming Java 17).

[Jakarta EE article](https://blogs.oracle.com/javamagazine/java-jakartaee-cdi-ejb-jsf-tijms), [InfoQ article](https://www.infoq.com/news/2021/06/jakarta-ee-9-1/), 

***

### Releases
#### Kotlin 1.5.20
Kotlin 1.5, the first major release this year, got out eight weeks ago (see [issue 35](https://bpfnl.substack.com/p/how-to-build-java-applications-today-faf)). It now has its first maintenance release: On the JVM, string concatenation is faster, and there is experimental support for calling [Lombok](https://projectlombok.org)-generated methods. Gradle executes [parallel Kotlin tasks better](https://docs.gradle.org/current/userguide/performance.html#parallel_execution) and has faster builds in [some cases](https://youtrack.jetbrains.com/issue/KT-28901).

Kotlin/Native and Kotlin/JS also got better, but those are niche topics (read the announcement if you’re interested).

[Announcement](https://blog.jetbrains.com/kotlin/2021/06/kotlin-1-5-20-released/)

***

#### Eclipse GlassFish 9.2
GlassFish is a Jakarta EE 9.1 compatible application container. Oracle [donated it to Eclipse](https://www.linux-magazine.com/Online/News/Oracle-Donating-Java-EE-to-the-Eclipse-Foundation) in 2017. It now runs on Java 16, but that’s “not fully tested”; Java 11 is officially supported. The one new feature is Jakarta MVC ([Eclipse Krazo](https://eclipse-ee4j.github.io/krazo/), according to [InfoQ](https://www.infoq.com/news/2021/06/java-news-roundup-jun21-2021/)).

[Downloads](https://projects.eclipse.org/projects/ee4j.glassfish/downloads)

***

#### Spring Tools 4.11.0
This version supports Eclipse 2021-06 (see [previous issue](https://bpfnl.substack.com/p/how-to-build-java-applications-today-5ca)) and has early-access builds for Apple’s M1 ARM Macs. It’s available for [Eclipse & Visual Studio Code](https://spring.io/tools/).

[Announcement](https://spring.io/blog/2021/06/21/spring-tools-4-11-0-released)

***

#### Spring Boot 2.5.2 & 2.4.8
This pair of maintenance releases has [53 bug fixes, documentation improvements, and dependency upgrades](https://github.com/spring-projects/spring-boot/releases/tag/v2.5.2) for version 2.5.2 and [33 for 2.4.8](https://github.com/spring-projects/spring-boot/releases/tag/v2.4.8).

[2.5.2 announcement](https://spring.io/blog/2021/06/24/spring-boot-2-5-2-is-now-available), [2.4.8 announcement](https://spring.io/blog/2021/06/24/spring-boot-2-4-8-is-now-available)

***

#### Spring Data 2021.0.2 & 2020.0.10
The announcement lists the changelogs for the 15 (2021.0.2) / 16 (2020.0.10) sub-projects.

[Announcement](https://spring.io/blog/2021/06/22/spring-data-2021-0-2-and-2020-0-10-released)

***

#### Spring Security 5.5.1, 5.4.7, 5.3.10 & 5.2.11
Here are the changelogs: [5.5.1,](https://github.com/spring-projects/spring-security/releases/tag/5.5.1) [5.4.7](https://github.com/spring-projects/spring-security/releases/tag/5.4.7), [5.3.10](https://github.com/spring-projects/spring-security/releases/tag/5.3.10.RELEASE) & [5.2.11](https://github.com/spring-projects/spring-security/releases/tag/5.2.11.RELEASE).

[Announcement](https://spring.io/blog/2021/06/22/spring-security-5-5-1-5-4-7-5-3-10-and-5-2-11-released)

***

### And Now For Something Completely Different
#### The Iron Cowboy
A triathlon is [swimming, biking, and running](https://en.wikipedia.org/wiki/Triathlon). For an [“Ironman Triathlon”](https://en.wikipedia.org/wiki/Ironman_Triathlon), that’s 3.9 km (2.4 mi) swimming, 181 km (112 mi) biking, and a full marathon of 42.2 km (26.2 mi). Just finishing this is an enormous accomplishment that I’ll probably never reach.

James “Iron Cowboy” Lawrence is a [Canadian triathlete](https://en.wikipedia.org/wiki/James_Lawrence_(triathlete)). In 2012, he got a world record for completing 30 Ironman triathlons  in 11 countries. That’s more than one race **every two weeks**! He outdid himself in 2015: He ran **50** Ironman triathlons. On 50 **consecutive** days. In 50 **different** US states. And he succeeded! You can watch a [documentary](https://www.imdb.com/title/tt6183106/) about this.

And he did it again: **100** Ironman triathlons in 100 **consecutive** days! He gave an encore, so it’s **101 triathlons**. Ok, he stayed at home in Utah this time, but come on! I want to say that this is the greatest sports accomplishment I’ll ever see in my entire life, but who knows what he’s up to next. He’s 45, so I hope he takes it easy now and stops making everybody else look so weak.

[50.50.50 documentary](https://www.imdb.com/title/tt6183106/), [website](https://www.ironcowboy.com)

***

## About
Karsten Silz is the author of this newsletter. He is a full-stack web & mobile developer with 22 years of Java experience, author, and speaker. 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 an [author at InfoQ](https://www.infoq.com/profile/Karsten-Silz).