Custom Search


JavaScript and Java are NOT the same thing, but they are related. JavaScript is a very, very distant cousin of Java in that it is also an object orientated programming language. Many of their programming structures are similar.But, JavaScript contains a much smaller and simpler set of commands than does Java.

The differences between JavaScript and Java

Java is a much larger and more complicated language than JavaScript. JavaScript is a much smaller and simpler language than Java.
Java creates standalone applications. A Java applet (so-called because it is a little application) is a fully contained program. JavaScript is text that is designed to be read by a browser. The browser will then interpret it and act upon it.
Java applets run independent of the HTML document that is calling for them. The applet may allow parameters to be set by an HTML document - colour, text fonts etc. JavaScript uses the browser as an interpreter - and different browsers might result in different outcomes.
Java must be compiled into machine language before it can be run on the Web. JavaScript requires no compiling - only interpreting.
Once a Java program has been compiled any alterations to the coding will require you to compile again what is effectively a different applet. JavaScript is easy to 'tweak'...


JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha. It was later renamed LiveScript. LiveScript was its name when it was released with Netscape Navigator 2.0 in September 1995. But in December of that year it was renamed JavaScript when Netscape added support for Java technology in its Netscape Navigator web browser - which at the time was the top browser choice!

The final choice of name caused confusion, giving the impression that the language was a spin-off of the Java programming language, but whether it was a marketing ploy by Netscape to give LiveScript the prestige of association with 1995's hot new web-programming language or whether it was the result of a co-marketing deal between Netscape and Sun is not clear.

Using JavaScript to:

change colour of text on a webpage