Skip to main content

JavaScript Is Unrelated to Java and Got Its Name for Marketing

Two languages arrived in 1995. One was built by James Gosling at Sun Microsystems and compiled to bytecode for a virtual machine. The other was drafted by Brendan Eich at Netscape in a matter of days and interpreted by a browser. They share a curly brace syntax and almost nothing else, yet their names suggest a family relationship that has never existed. JavaScript is not a cut down Java, does not run on the JVM, and was never derived from Sun's codebase.

The confusion is understandable once you look at the timeline. Netscape wanted a scripting language inside Navigator and pursued two tracks at the same time: collaborating with Sun to embed Java, and hiring Eich to put Scheme into the browser. Management then decided Eich should invent a new language whose syntax looked like Java rather than Scheme, because Java was the fashionable name in every enterprise procurement conversation of the era. The result shipped in a Navigator beta in September 1995 under the name LiveScript.

The rename happened before the official release in December 1995, announced jointly with Sun. Java was climbing fast during the early dot com boom, and attaching its name to a browser scripting language was free marketing. Eich has said publicly that he read the change as a marketing ploy by Netscape rather than a technical statement, and that is exactly what it was. Nothing in the language changed to justify the new name.

Some real borrowing did happen, which is why the myth survives. The original JavaScript reserved all of Java's keywords, its standard library followed Java naming conventions, and objects like Math and Date were modelled on classes from Java 1.0. That was deliberate scaffolding to make the language feel familiar to developers arriving from Java, not evidence of a shared implementation. Microsoft muddied the water further in 1996 by shipping its own interpreter called JScript, which forced the standards work that produced ECMAScript in 1997.

For a working developer the distinction has practical consequences. JavaScript's object model is prototype based, so inheritance flows through object links rather than class hierarchies, and its numbers are all double precision floats rather than the split between primitives and boxed objects that Java uses. Concurrency is event driven through a single threaded event loop rather than threads with shared memory. You cannot take a mental model built in Java and drop it into JavaScript without rewriting your assumptions, and teams that try tend to produce code that fights the runtime.

The naming decision also shaped how the language was judged for years. Reviewers who expected Java like rigour found a language with loose equality, automatic coercion and a global scope, and concluded it was sloppy. What they were actually looking at was a small scripting language designed for a different job, wearing a name that promised something else. TypeScript exists partly to bolt back the safety that people assumed the name implied.

There is a lesson in this for anyone naming a product today. A borrowed name can buy attention, but it also sets expectations you will spend years correcting. Netscape got its headlines, and the JavaScript community got a couple of decades of explaining that it has nothing to do with Java. If your own project needs a name, pick something that describes what the tool does, not what happens to be popular in the quarter you launch.

We use cookies for ads and analytics.