Some reasons I found: - it's a matured stack with a matured framework (Spring)
- there's already a lot of Java knowledge in the company
- there are already existing services written in Java. Why should the company start to maintain another stack?
- there's a lot of Java knowledge walking outside the company. So hiring is easier.
- it's still taught as one of the first languages at universities.
I've only seen few alternatives for language usage:
- C#, but then you lock-in to Microsoft.
- Typescript, but there are still skeptics
Anyway, the number of companies who are adapting other languages like Go or Python is rising. That's my biased perspective as a Cloud developer working in finance, IIoT. I don't know how it looks like for other areas.
Are we actively trying to remove Java from our application portfolio? No. If an application is due for an overhaul, then it won't be re-created in Java. But application overhauls aren't nearly as frequent as people would like. In my experience, applications can have a 20-30 year lifespan.
Java does have its place - but it is one of those stacks where you need to be all in, or not. Sprinkling Java in a few places around your ecosystem is not a good place to be.