Earlier quoted context omitted.
Unpopular opinion: I feel Google should be punished for what they did to Java. Maybe the mechanism being used is wrong, but Android bastardized Java and as an Android developer I feel real damage has been done to the health of the Java ecosystem by having billions of devices run fragmented Java-but-not-Java. Google has started to make it right with the switch to openJDK and Desugar, but in a lot of ways it’s too litt…
So you want Swing apps on Android?
Java on the server was not in decline, but Java on the desktop was declining, had declined. Applets were dead, very few success stories around Java Web Start. And the main three 'consumer' success stories for Java on the frontend were Limewire, Minecraft, and IntelliJ/Eclipse. As a consumer facing technology, Java was a complete failure. No sane person wanting to ship a commercial, consumer app to end users would consider Java as a first choice. I have been a Java developer from the day HotSpot Alpha was released, I say this as someone who loves the platform.
Personal Java failed. I worked for years on J2ME apps, Java on high end Nokia Phones, Java on Palm devices (Ghost VM), etc. All these platforms amounted to nada. Flash was far more widely used for front end user facing apps than Java. Ditto for Visual Basic.
The relevance of the Swing comment is the people complaining about the fragmentation of Java's write-once-run-anywhere promise, which was always more of a promise than a reality. If you want to make a viable mobile Java, you had to remove Swing, Java2D, CORBA, JMX, and a ton of other JDK libraries, which is exactly what Sun did with the various profiles as well. But once you do that, you have "fragmentation"
If Google had not produced Android, I can bet the leading platform today for mobile development that is not from Apple, would either be Xamarin based C#, or some scripting language like Lua or Python on top of a Linux widget toolkit. Java would not be in the mix at all. Or perhaps it would FlashMX sitting on top of Linux (ugh)