Why do Java and JavaScript have a similar name?

Java and JavaScript have a similar name because Netscape and Sun Microsystems agreed to use JavaScript as a complementary scripting language alongside Java, a compiled language. Brendan Eich, the creator of JavaScript also considers the naming a marketing ploy by Netscape to piggyback off the success of Java.

The naming conventions of JavaScript and Java always cause some issues for new developers. You’ll often see aspiring developers asking whether they should learn Java or JavaScript first. The reality is that they represent two very different career tracks for software engineers.

The two are similar in name and some syntax but are style different in design. Let’s dive a little deeper and understand why JavaScript shares a namesake with Java. Then look at the original name of JavaScript and how it’s different from Java.

Why does JavaScript have Java in its name?

JavaScript has Java in the name because Netscape and Netscape agreed on a licensing deal for JavaScript to run as a complementary scripting language alongside Sun’s compiled Java. At the time Java was one of the hottest programming languages, so the naming of JavaScript to include Java was a marketing ploy.

Back in 1995 web pages were purely static and lacked any sort of dynamic behavior. Netscape had the most popular web browser at the time, Mosaic, and wanted to make the pages dynamic. They then worked with Sun Microsystems, now Oracle, to embed Java in the browser. However, when Brendan Eich was hired, they tasked him with building a language with similar syntax to Java but that was less clunky than existing scripting languages.

The eventual result was something named Mocha, which later became LiveScript and shipped with the beta version of Netscapes’s new browser Navigator. LiveScript then became JavaScript in time for the December release of Navigator. So in the seven months between May and December of 1995, the name changed three times!

Naming conventions

The confusing naming doesn’t end there.

JavaScript is not an open name, it’s actually trademarked by Oracle. When JavaScript was submitted for standardization, Netscape didn’t allow the use of the name JavaScript. So, the ECMA International Organisation, the body in charge of standardization of information and communication systems, named the standard ECMAScript.

It means that JavaScript is an implementation of ECMAScript that follows the rules, details, and guidelines in order to be ECMAScript compliant.

The issue comes when a new version of ECMAScript is released. Many of the JavaScript engines used in browsers don’t support it automatically. It takes time for the new standard to be implemented across all browsers, so cross-browser support is always evolving.

What is the original name of JavaScript?

JavaScript was originally named Mocha which then changed to LiveScript before finally becoming JavaScript. The three name changes took place over six months from May till December 1995. The final naming was down to JavaScript being a complementary scripting language to go with Java, as Sun and Netscape had a deal going at the time.

JavaScript made its debut as LiveScript in the beta version of Navigator before being given its namesake just before the official release of Netscape’s Navigator. The creator of Javascript, Brendan Eich, believes the final name change was made to take advantage of the roaring popularity of Java at the time. Essentially the name change was a marketing trick.

When the time came to submit for standardization, Netscape had revoked the right to use the JavaScript name. It means that it was submitted as ECMAScript. Around that time, To confuse matters further, Microsoft then brought out their version of JavaScript called JScript. JScript was an ECMAScript compliant scripting language but has since been deprecated.

Nowadays you see JavaScript versions named ECMAScript 2015 and ECMAScript 2020, or ES2015 and ES2020 for short. ECMAScript just refers to the global standard that defines the rules for using JavaScript.

Is JavaScript another name for Java?

Although they share a similar name and syntax, JavaScript is not another name for Java, and the two have very little in common. JavaScript is a front-end language that is used by 97.8% of websites today but Java is a class-based language predominantly used on the backend.

For newbies, the terminology can be quite confusing but make sure not to mistake the two. If you want to be a front-end developer, learn JavaScript. If you want to become a back-end developer you are better off knowing Java.

Front-end development has come a long way in the past decade and as a result, JavaScript is now being adopted for both the front and backend. Java remains widespread but has declined in popularity over the past decade.

Resources