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

## TL;DR
snyk JVM Ecosystems Report 2021, Google's UI toolkit Flutter 2.2, Eclipse IDE gets a working group, Eclipse 2021-06, Spring Native 0.10.0, Keycloak 14.0.0, and WildFly 24.

***

## README
This is **issue 41** of my weekly newsletter, “How To Build Java Applications Today”. I read all the Java newsletters, so **you** don’t have to! 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
*Idealism is what precedes experience; cynicism is what follows.‌*
[David T. Wolf](http://www.quotationspage.com/quote/29731.html), an American writer ([born 1943](https://www.amazon.com/David-T.-Wolf/e/B00BWI5I1A)), may be a bit harsh. Can’t we have **realism** following?

***

## Stand-Up
Last Wednesday, I gave a [40-minute conference talk](https://betterprojectsfaster.com/learn/talks-it-tage-2021-jhipster-faster-tools-and-technologies) about “Pick Technologies & Tools Faster by Coding with JHipster”. It’s in German, and it’s behind a paywall. I guess that’s the definition of “in-accessible” to most of my readers. I hope to hit some JUGs in the fall, so there could be a publicly available, English version of this talk in our future!

***

## Code Review
### Issue 39 from June 14, 2021
#### Prosus Buys Stack Overflow
[Last week](https://bpfnl.substack.com/p/how-to-build-java-applications-today-457) I wrote about the Internet outage that left Stack Overflow offline for a good hour. But Stack Overflow stays in the news: Just two days later, [a blog post](https://stackoverflow.blog/2021/06/16/state-of-the-stack-q2-2021/) tried to calm us worried developers. Three promises stick out in that post: No paywall for community content, no limits to copy & paste, no advertisement overkill. We’ll see.
 
***

## Bookmarks
### Java
#### snyk JVM Ecosystems Report 2021
*The second of the two “What tech do we Java developers use?” reports is here: 62% of developers use Java 11 in production, 25% even Java 15, AdoptOpenJDK leads with 45%, Spring Boot is at 58%, Kotlin is the second-most popular JVM language, IntelliJ IDEA is 3x as popular as either Eclipse or VS Code, and Maven is used twice as much as Gradle.*

Before we dive into the details: We can’t compare this year’s numbers against the [ones from last year](https://snyk.io/blog/jvm-ecosystem-report-2020/) because the survey allowed for multiple answers this year. But the data is fresh: The survey ran for six weeks in February and March 2021. Don’t ask me why it took three months to publish.

The biggest surprise is that 62% use Java 11 in production and “only” 66% use “Java 8 & older”. The “JRebel 2021 Java Technology Report” (see the section of the same name in [issue 27](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4b3)) says only 36% use Java 11 and 84% use “Java 8 and older”. That was based on 876 responses from August to November last year. Where does the difference come from?

I don’t think that half a year (February/March vs. August-November) makes a big difference. To me, it comes down to the surveys. Surveys are hard, even if you’ve been doing it for decades. Just look at the last two US presidential elections as an example. And even if you ask 2,000 randomly selected, perfectly representative people, you still get an [error of +/-2.2%](https://www.sciencebuddies.org/science-fair-projects/references/sample-size-surveys).  And I think neither of these two surveys asked “perfectly representative Java developers”. What is that even?! And these are global surveys, which complicates everything by an order of magnitude or two.

Just look at the Java version numbers from the JRebel report: Java 8 increased from [58% in 2020](https://www.jrebel.com/blog/2020-java-technology-report) to 69% in 2021, “Java 7 or older” grew from 7% to 15%. I don’t think we’re seeing an increase of Java 8 or older in the wild. I believe we’re seeing bad surveys.

We can’t compare framework numbers between the two reports directly because JRebel only asked for the **main** project. But we **can** compare the ranking: JRebel put Java/Jakarta EE into the “Other” bucket (17%) and declared DropWizard (9%) the runner-up behind Spring (62%). snyk makes Java EE (24%)/Jakarta EE (13%) the runner-up and puts DropWizard at a paltry 4%. snyk even distinguishes between Spring Boot (58%) and Spring MVC (29%) and makes Quarkus the leader of the “Hip Framework Pack Chasing Spring Boot” (11%).

AdoptOpenJDK has 44% JDK market share; its Eclipse incarnation Adoptium already 1.3% in this report (see section “AdoptOpenJDK Gets Eclipse Working Group and Access to TCK” in [issue 29](https://bpfnl.substack.com/p/how-to-build-java-applications-today-3af). Next is Oracle’s OpenJDK at 28%, followed by Oracle’s “Non-OpenJDK” at 23%. The third place among OpenJDK distributions goes to Azul with 16%.

No surprise: Java is the most popular JVM language with 91%. Kotlin is second with 18%, Groovy third with 13%. You know, **that** Groovy which is 3.5 times as popular as Kotlin in the TIOBE index (see [last issue](https://bpfnl.substack.com/p/how-to-build-java-applications-today-457)). Sigh. 

IntelliJ IDEA reigns supreme with 72%, Eclipse is second with 25%, and Visual Studio Code has a strong 23%. Every second developer uses more than one IDE, every fourth developer four or more. Guys: I hope somebody **forces** you to use four different IDEs! I can’t imagine why I would **want** to do that…

Build tools are the last stop here: 76% use Maven, 38% Gradle - the usual 2:1 split. My condolences go out to the 12% who still use Ant.

Dear snyk, dear JRebel! Every year you run surveys, asking us Java developers about the technologies & tools we’re using. We love to read those results! But surveys are hard, and you’re not good at it. And you already know the answer to our most pressing questions. You, snyk, [scan our build files](https://snyk.io/product/open-source-security-management/): So you know what frameworks we use and what build tools. And you, JRebel, [sell a class loader](https://www.jrebel.com/products/jrebel): You also know what frameworks we use - and which Java versions & which Java distributions on top. So please stop asking us those questions and put a “Share data anonymously with vendor” option into your tools instead. Thank you! 

[snyk report](https://snyk.io/jvm-ecosystem-report-2021/)

***

### Over the Fence
#### Google's UI Toolkit Flutter 2.2 Claims Cross-Platform Crown
*I think Google’s Cross-Platform UI Toolkit Flutter is the best way for Java developers to build native business applications on iOS & Android. Google claims it’s also the most popular one now. Version 2.2 is a bug fix & stabilization release.*

I’m shamelessly ripping myself off here by writing about an article that I published today on InfoQ. And yes, I snuck a “[2.5 alliteration](https://en.wikipedia.org/wiki/Alliteration)” into the title. 😁 Even “more rip-some”: I often talk about how Java developers should build front-ends with Flutter, most recently at a [conference in Japan](https://betterprojectsfaster.com/learn/talks-jjug-spring-2021-how-to-build-front-ends/).

But I **really** think that [Flutter](https://flutter.dev) is the best way for us Java developers to build native iOS & Android apps today. 

But doesn’t Flutter use [Dart](https://dart.dev)? We don’t want to learn another language! I agree - but **this** is Dart:

```
class MyClass extends AnotherClass {
  String myString;
  int myInt;
  List<String> myList = new List<String>();

  String sayHello(String name) {
    var feedback = "Hello, " + name;
    return feedback;
  }
}
```

Looks a heck like Java, doesn’t it? Only the `new List<String()` doesn’t compile in Java. 

Now Flutter doesn’t use the native UI elements but emulates them instead. But I think it’s good enough for our iOS & Android business applications. And are you tired of waiting for your Angular app or Spring Boot server to restart? Flutter code changes are live in less than a second. See for yourself in [my short video](https://www.youtube.com/watch?v=M5SwmlubUGo)!

So what did Google announce for Flutter 2.2?

You can tell that lots of people still ask, “[When will Google kill Flutter?](https://killedbygoogle.com)”. Why? Because half of the [release announcement](https://medium.com/flutter/announcing-flutter-2-2-at-google-i-o-2021-92f0fcbd7ef9) is Flutter touting how it’s the most popular framework now, and how all these wonderful companies use Flutter for all these wonderful-ler apps, and how the wonderful-lest companies even port Flutter to new environments. Look at Google’s [Angular 12 announcement](https://blog.angular.io/angular-v12-is-now-available-32ed51fbfd49) a week earlier for contrast: No chest-thumping, no name-dropping, just stuff that’s in the new release.

To be honest: There isn’t much new in Flutter 2.2. It’s a lot of bug fixes, performance optimizations, and some new features we probably don’t care about in our enterprise applications (Google Ads, in-app purchases, and in-app payment). That’s a good thing, in my mind - Flutter added a lot of functionality recently, so some clean-up is welcome.

So if you’re curious about Flutter, then you can quench that thirst by watching 16 minutes of my talk - or 8 minutes at double speed ([time-stamped YouTube link](https://youtu.be/kQxTuZ8bUI0?t=1222)). I compare Flutter to React Native and tell you what I liked and didn’t like about using Flutter in my current project. And my talk page has [links to get you started](https://betterprojectsfaster.com/learn/talks-jjug-spring-2021-how-to-build-front-ends/#flutter--dart).

My [InfoQ article](https://www.infoq.com/news/2021/06/flutter-2-2-dart-2-13/), my [“front-ends for Java developers” talk](https://betterprojectsfaster.com/learn/talks-jjug-spring-2021-how-to-build-front-ends/)

***

### Tools
#### Eclipse IDE Gets A Working Group
If you’re an Eclipse project, then you can’t get by without a working group. Adoptium, the “Eclipse version of AdoptOpenJDK”, got one before it’s even done setting up shop at Eclipse (see section “AdoptOpenJDK Gets Eclipse Working Group and Access to TCK” in [issue 29](https://bpfnl.substack.com/p/how-to-build-java-applications-today-3af)). MicroProfile [delayed their 4.0 release by nearly half a year](https://betterprojectsfaster.com/blog/weekly-links-2020-11-09/#the-road-to-microprofile-40httpswwwinfoqcomnews202011the-road-to-microprofile-4) to install one. So, how’s the Eclipse **IDE** working group doing these days?

Splendidly, because it **was just created**! Yep, the Eclipse IDE that had its [first release in the Eclipse Foundation 17 ago](https://en.wikipedia.org/wiki/Eclipse_(software)#Releases) never had a working group! How did they function all these years? How did they know what to do? Are some Eclipse projects [more equal than others](https://www.dictionary.com/browse/all-animals-are-equal--but-some-animals-are-more-equal-than-others)?!

To be fair: The Eclipse IDE project [started at IBM](https://en.wikipedia.org/wiki/Eclipse_(software)#History) years before the Eclipse Foundation was created [in January 2004](https://en.wikipedia.org/wiki/Eclipse_Foundation#History). So the foundation probably let the “working group” slide the first year. Or maybe it didn’t even require one back then. And somehow, the “working group” topic never really came up again **for 16 years**! I can see the MicroProfile guys silently weep when they read this…

[Announcement](https://eclipse-foundation.blog/2021/06/17/shaping-the-future-of-the-eclipse-ide/)

***

### Releases
#### Eclipse 2021-06 
Let’s stick with Eclipse: There’s another quarterly release. And like with any other Eclipse IDE release that I’ve had the “pleasure” to cover, the release notes are a [freakin’ dumpster fire of disjointed links](https://www.eclipse.org/eclipseide/2021-06/noteworthy/). Some look like [it’s 1995](https://www.eclipse.org/graphiti/pages/whats-new-0.18.html), some [lost the links altogether](https://www.eclemma.org/changes.html), some don’t know that [strike-through text is hard to read](https://bugs.eclipse.org/bugs/buglist.cgi?list_id=20343413&product=ECP&query_format=advanced&target_milestone=1.26.0), some look [Eclipse-like](https://wiki.eclipse.org/CDT/User/NewIn103), and [some don’t](https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2021/03/02/version-2-25-0).

If the Eclipse guys can’t be bothered to sort out this mess once a quarter, then I don’t, either. The main page says Eclipse now supports Java 16 and Apple’s M1 Macs and improves the Java tooling and the terminal. The rest is up to you (to read). Good luck!

[Project page](https://www.eclipse.org/eclipseide/2021-06/)

***

#### Spring Native 0.10.0
Spring Native uses GraalVM to turn Spring Boot applications into small native images that load quickly. We need Spring Boot 2.5 and GraalVM 21.1 to try it out.

This version makes one-third of all Java developers happy who use Gradle: Spring Native works with Gradle now! It can also run tests now and handle proxies on classes for the ahead-of-time compilation with GraalVM.

And as the Spring Boot fans in the Quarkus team [like to point out](https://youtu.be/jjwbtmjcyu4?t=16): Spring Native needs some more time to bake in the oven! Spring Boot used 126 MB in one of their tests when compiled natively - vs 15 MB for Quarkus. Even in “interpreted JVM mode”, Quarkus used less memory (115 MB)!

[Announcement](https://spring.io/blog/2021/06/14/spring-native-0-10-0-available-now)

***

#### Keycloak 14.0.0
That was quick: Six weeks after version 13.0.0 (see [issue #36](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4ee)) comes version 14.0.0. A refresher: Keycloak gives us [OAuth 2.0](https://en.wikipedia.org/wiki/OAuth#OAuth_2.0) and [OpenID Connect](https://en.wikipedia.org/wiki/OpenID#OpenID_Connect) for authentication, [LDAP](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol) and [Active Directory](https://en.wikipedia.org/wiki/Active_Directory) for that “enterprise feeling”, and “[social logins](https://www.keycloak.org/docs/latest/server_admin/#_general-idp-config)” for Google, Facebook, GitHub, Twitter & more.

As we expected, they didn’t add much in those six weeks. Keycloak now officially supports Financial-grade API (FAPI) and improved user profile management & offline sessions. The full issue list is [in JIRA](https://issues.redhat.com/browse/KEYCLOAK-18488?jql=project%20%3D%20keycloak%20and%20fixVersion%20%3D%2014.0.0).

[Announcement](https://www.keycloak.org//2021/06/keycloak-1400-released.html)

***

#### WildFly 24
We all run Java in containers, Kubernetes, the cloud, or all of those at once. Or so they say. Now here comes a release for the old-fashioned among us: an application server! Apparently, they are not extinct yet. So, what’s new?

The “MicroProfile Reactive Streams Operators subsystem“ is now up to [version 2.0](https://github.com/eclipse/microprofile-reactive-streams-operators/releases/tag/2.0), client passwords can specify [character set & hash encoding](https://github.com/wildfly/wildfly-proposals/blob/main/elytron/WFCORE-5027-charset-encoding-support.adoc), an [older SSL protocol is supported](https://github.com/wildfly/wildfly-proposals/blob/main/elytron/WFCORE-5145-ssl-allowed-protocols.adoc), and we can use [multiple SSL certificate revocation lists](https://github.com/wildfly/wildfly-proposals/blob/main/elytron/WFCORE-5170-multiple-certificate-revocation-lists.adoc).   

What’s **not** in the release?

[Jakarta EE 9](https://betterprojectsfaster.com/blog/weekly-links-2020-11-23#jakarta-ee-9httpswwwinfoqcomnews202011jakarta-one-conference-2020) support. Yep, that’s still in “[WildFly Preview](https://www.wildfly.org/news/2020/11/12/Jakarta-EE-9-with-WildFly-Preview/)”. And here’s a sentence you hope you never read about your app server: “The 24.0.0.Final release of WildFly Preview runs well on SE 16 and the SE 17 early access release for **most** use cases” (highlights are mine). In case you’re not “most use cases”, you have to wait some more for Java 16 support in WildFly. Stick with Java 8 or 11 until then.

[Announcement](https://www.wildfly.org//news/2021/06/17/WildFly24-Final-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, 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).