Java is terrible!
The syntax is verbose, the libraries huge, ..
I remember around 2000 when Java was really hot, and new multi-volume books about it came out every year - you bought one, and it was already out of date, ..
Years later, and .NET was the new hot, with huge books that instantly became outdated when they were published..
The .NET family of languages, especially C#, is really a much better Java.
Sadly, it requires a runtime, and it is a hassle to have to deal with assemblies - they are even more cumbersome than regular DLLs! Horrible!
I blame .NET and Hejlsberg and Microsoft - they stole the Borland engineers, remember? for the fact that it is not Delphi and Object Pascal that dominates today.
Yes, .NET is fast and Java is quite close to be just as fast, but the runtime!
.NET is open source, Mono has been for years, and now Microsoft themselves opened up the rest of it, so it is much better than Java, that still suffers from being choked by a corporate entity (Oracle).
Remember the recent vulnerabilities, and just how slow they dealt with it?
I am a Linux guy, and I would actually reach for .NET before reaching for Java.
However, I like native code, and I like small and nimble executables.
C is much better than C++ in that regard, but Free Pascal is actually better.
Disclaimer:
I like my languages small.
Thus I do prefer PHP to Node.js, C to C++, and - in the end: .NET to Java.