It was done on purpose, and early on JVM was shipped with Netscape Navigator. The rebranding of LiveScript (iirc) to JavaScript was done to connect to the Java hype of the time.
That was the summer that MarcA publicly announced that Netscape would be a pure Java app by the end of the year.
So one of the mainline JavaScript interpreters was written in Java, and the JavaScript could call out to that engine, so you could load Java plugins at runtime, extend the JavaScript interpreter.
So you could say "Java" many times during the tech demo.
It's like when Panel de Pon for the Super Famicon was rebranded and rereleased as Tetris Attack for the Super Nintendo. It has nothing to do with Tetris, but Tetris was a popular game at the time.
I don't remember that java script logo - it looks like a knock off of the Sunsoft Java trademark of the era, however. Does that image have any provenance? It looks like a professional imitation but I am seeing straight trade dress if not actual Langham Act infringement.
It’s a parody logo and a straight copy of the Java logo, on purpose. The point is to ridicule the lack of legitimate connection between the two languages, as pointed out above thread.
So one of the mainline JavaScript interpreters was written in Java, and the JavaScript could call out to that engine, so you could load Java plugins at runtime, extend the JavaScript interpreter.
So you could say "Java" many times during the tech demo.