For my use cases, Java has all the wrong compromises:
- not high level enough to compete with Python/Ruby/JS/PHP, etc
- not low level enough to compete with Rust/D/Nim/Zig
- not specialized enough to compete with Erlang/R/Go/Julia
- not opinionated enough to compete with Lisp/Haskell
So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool of devs. And many companies already use it and the tooling is excellent.
But those are not sufficient reasons for me.
Python is older than Java, well supported, battle tested, documented with a huge pool of devs. But it's way better for high level stuff, data mangling, scripting, gluing, and for most web dev stuff.
If I want a distributed system or something with a lot of I/O, Erlang and Go will always be better than Java. Sure, they are less widespread, with all the stuff it implies, but for such a nice need, I will pay the price hapily: my goal is optimization for the use case. Same for stuff that needs to go fast or have a small footprint, I'm not going Java if I can go Rust.
If I want to have fun, Java is out of the loop. Better sharpen my inner weirdness by fighting with some exotic lisp. Why try productive ? I wanna enjoy myself, not run a business.
So Java is not a bad choice. It's an excellent tech. I just don't have a use case for it.