For a technology to be legacy, I think it needs to be stale and falling out of use for new projects. I don't see that with Java. New releases with new language features are being released at a faster pace than ever, and companies are still building new products on it.
Java hits a sweet spot of performance, tooling, and productivity that few other ecosystems can. It's biggest competitors are probably C# and golang, and, for various reasons, it is holding its own just fine against them.
If you remember Duke, you're old. I still remember when Sun was going around holding Java events, touting the advantages of Java, with Duke shirts, mugs, etc.