I don't think this is true. Yes in the US in the startups Python, RoR and JS are more popular but in the enterprise Java (and .Net to some extent) still rules. In India right now the demand for Java programmers is sky high. Salaries for Java programmers have increased by 100% or more in the past 6 months or so. Actually overall salaries for programmers have increased a lot in India in the past 6 months due to very high outsourcing demand but Java is in especially high demand.
Note: I am in the outsourcing industry since past 12 years.
Yes, Java is successful, both as a language and as a runtime. Obviously. You can't argue with billions of Android phones. Or the (possible?) news that FB has already given up and will be simply using Android for Meta.
I don't think a lot of folks here were around at the time to remember that a lot of the early hype around Java and the Web were both about unseating Microsoft.
Microsoft has thrived.
Sun is in the dustbin of history. Yes, mountains of cool tech came out of Sun, but as a company, as a existential threat to MS? Java didn't deliver.
That's not to say it couldn't have, had Sun managed it differently. But if Sun had managed it differently, it probably wouldn't have been the success that it is as a technology.
Without cloning the language, Alphabet would never have been able to standardize non-Apple phones under one advertising platform.
Only contenders I can think of are C# or Go.
Go is even newer and even less successful vs Java.
Firstly it's awful in large business logic heavy programs. It's getting better with generics but it's error handling and module structure mean it's very ill-suited to the sort of software Java thrives in.
I think the only real competitor to Java (both on Android and backend/desktop) is Kotlin.
It will be years until enterprise shops are caught up to where .NET is atm, that is just the way of things.
FWIW it's not much better in Java-land. Most enterprise shops have apps they refuse to invest in upgrading off of Java 6. Java 8 still has huge share though thankfully in the last few years Java 11 is catching on.
I like Java and C# a lot, they appeal to me above the rest of the langs for practical reasons but I don't miss distancing myself from actual enterprise development - that is where passion goes to die.
For example, projects that got started 10 years ago are very likely to have got in Java started (as it still even was the main programming language teacher at universities.)
New projects are more likely to get started in python, typescript, go or even c++ just depending the industry. It’s been a while since I do not see a new brand project starting in Java.
Someone may dismiss my opinion with a statistic, and it will also be fine. I don’t think Java did endanger Microsoft,
Solaris OS is now history and many programming language competitors raised and won over it at its own game in all areas but android, although it was an industry leader for quite long time its time is over and now it is mainly corporative legacy.
Even as general programming language Python and JavaScript took over, and in dedicated areas like webservers it’s been long since Java’s time is gone. The analysis in the replies is correct.