Java ended up finding a niche in the server farms where there were once enough different chip architectures and operating systems to make the “write once run anywhere promise” compelling. And in those server farms Java has lived on, a favorite of enterprise IT shops addicted to reliability and developers with a love of strong typing.
Yet despite the rise of competition, Java continues not only to survive but to excel. Many of the teams tasked with developing microservice architectures are continuing to use Java. A major reason must be because the technology is battle-tested from years on the front lines parsing HTTP requests. Sun created a rock-solid virtual machine, and Oracle continues to nurture and support it.
Another reason must be the continued evolution of the language. Java 8 offers solid support for the functional languages like Scala and Kotlin. The JVM is now a foundation for many of the best experiments in computer language development. Dozens of new languages can compile down to Java byte code and link up with each other to make complex projects work together. Many of the stacks running smoothly on a JVM may be built by a mixture of Java and a number of other languages.