Why does JavaScript have Java in its name?

Let's start by saying that JavaScript wasn't the first name. Initially, it was called Mocha, then LiveScript, and only then JavaScript.

However, JavaScript has nothing to do with Java. They are completely different languages. Why, then, include Java in the name?

At the time, Java was a super popular, new language, so it is believed that it was a marketing move, to ride on Java's popularity. Even Brendan Eich, the creator of JavaScript, thinks so.