Toward the end of the 90s, Java was a cool language with a new paradigm: write once, run everywhere. I remember people advocating it passionately. A few years later, Java was everywhere: servers, web browsers, programming courses… It was de facto the standard language in many domains.
Just a few years ago, JavaScript became that cool language with a new paradigm: run the same code in the server and the browser. In a few years, it became ubiquitous.
I suppose the OP intended the comparison in this way, not in a feature comparison or a judgement on the maturity of the ecosystem.
No it absolutely is not.
The benefit of Java is all of the enterprise libraries and support. After all of these years I still don't see any of that in Javascript.