I will die on the hill that Java was a good language, and had the potential to leapfrog us from where we are by at least a decade.
But it got hobbled by the awful, awful enterprise style culture, cultural misunderstanding of OOP (especially inheritance), and corporation shenanigans (fucking oracle).
I think this is a selection bias speaking rather than a reasonable reflection of what goes on in the Java world. Some insanely sophisticated and high quality technologies are written with Java.
The problem is like with JS or PHP, it is ubiquitous in many settings. There are a lot of people who can use it because it was the default language taught in CS programs, many corporate settings for decades, or similar. It’s the runtime for android devices. It’s everywhere. Of course you’ll encounter a lot of low quality developers.
Your comment mostly indicates that you haven’t been fortunate enough to encounter the high quality Java devs, not that they don’t exist. They exist and they build world class software that backs massive systems like elastic search, Kafka, spark, or Cassandra.
When I started to use elastic search I found out that with some incorrect queries you could "poison" the process entirely and it would respond incorrectly to every single query from that moment on, until you killed it and restarted it.
They responded to my issue several years later. I had changed jobs and I couldn't care less any longer.
Compose and AOT compiled binaries would be amazing (GraalVM Native Image kinda thing) but it doesn't look very easy at the moment. Leyden with a regular JVM might be the best we get.
Compose UI apps can be compiled to native binaries already, via Kotlin's LLVM backend, though at the moment only the macOS/iOS targets have proper (official) support. Last I looked (a few years ago now), the Linux and Windows targets shouldn't be too far off, since it's all built on top of Skia already, someone just needs to care enough to put in the work. (But since right now you already get coverage for all platforms between JVM and Wasm, not to mention hot reload support on the JVM, there's little motivation to do so.)
We were writing and shipping desktop applications with it back in the nineties. Although many of the arguments against it were similar to the arguments against Electron today.
I think the UI look and feel was very ugly for many users and that caused its demise. The cross platform skin was ugly. The native skins were in the uncanny valley.
The framework was reasonably good for its time. By the time good looking UI frameworks came, the bad reputation was already set.
Even the later JavaFX was a tasteless exercise. I opened some apps and you could tell within 1 second that something was wrong because all the text was using fugly non-platform-native (or somehow screwed up) text rendering.