Sun destroyed the market for Java.
Sun wanted to sell hardware, and they designed Java to run well with their hardware. Sun's ideal was the network is the computer. Java is/was a client language that could run on a lot of platforms, with in Sun's mind a Sun server at the other end. Didn't quite work out that way. Sun was going belly up, Oracle bought the carcass. Sun gave Java away. You can't put the jinni back in the bottle.
Java was worthless when Oracle bought Sun. They're engaged in revisionist history trying to milk a dead cow.