Published at: Feb 19, 2022
Java... JavaScript... wait they're two different things?!
That's right! Very different technologies with very similar names. They were both very popular in the 1990's due to the rapid expansion and popularisation of the internet, however it is JavaScript which has persisted and become even more popular on the internet, while Java in web browsers isn't supported by any of the major browsers any more.
Java and JavaScript are both programming languages which were created and became popular in the 1990s with the rise of the internet. They both allow websites to have additional functionality and interactive elements to them. For example, on an otherwise static and unchanging website - you could program and add a game, an animated menu, a Video player, a calculator or some other interactive app in a website. Features like this are taken for granted these days but back then they were exciting and a big deal.
Java relied on web browsers having the Java plugin installed in order to run. Whereas JavaScript was just "built-in" to web browsers and didn't require any additional installation or configuration.
If you had the Java plug in installed, your web browser could run "Java Applets" which were basically little software programs in your web browser. Java applets were quite advanced for their time - the 1990s - and could be used to do advanced graphics and animations, whereas JavaScript was much simpler and used for different sorts of things.
The only thing that JavaScript required was that you had a browser which supported JavaScript (and by the mid/late 90s they all did) and that you had JavaScript enabled.
One of the most interesting parts of both Java and JavaScript was that they were both "cross-platform" - in otherwords, you could develop the software on a Macintosh but it would work on a Windows computer without any extra modification or vice versa. This was a particularly big deal in the 1990s when there wasn't much cross-platform compatibility between different types of systems.
It was particuarly attractive to developers and companies who didn't want to develop software twice - they could write software and have it run on most types of platforms.
One of the major attractions of Java was that it gave fairly basic web browsers - namely: Internet Explorer and Netscape Navigator (a precursor of Firefox) - the ability to do fairly advanced things. It gave them functionality which they didn't natively have. However, over time, those web browsers began to implement various features by themselves, bit by bit removing the need to have external plugins installed to do them.
A part of this change was that JavaScript was also becoming more and more powerful. JavaScript was also easier to develop software in than Java - you didn't need to know as much, and you also didn't need to rely on your visitors having the Java plugin installed. With the growing popularity of the internet in the 1990s and 2000s this mean that more and more developers were learning JavaScript instead of Java to do various bits of web functionality.
Java script also started to develop quite a bad security track record as well - because Java applets were more powerful than standard webpages and JavaScript, this also mean that if there were security bugs found in the Java plugin they could have wider reaching and more damaging effects than if there was just some problem with JavaScript.
By the time Apple launched the iPhone in 2007 Java's reputation (along with Flash) was already looking pretty shakey, but due to Apple's decision to not support Java on the iPhone (which by the way wouldn't have been a hard decision!) it was probably the final nail in all Java Applet's coffins.
While Java is essentially completely dead in our browsers - only still used by a very small minority of websites who haven't updated their systems in a long time - there are some corporations which have put Java to good use in other arenas.
One of the key attractions of Java - it's ability to run the same code on very different types of systems - means that it is still used in a number of places outside our web browsers; places where cross platform compatibility is still very important. One of the most popular childrens games "Minecraft" is written in Java and uses it to run. It's also possible to develop Android apps with Java. Java applications also exist in a lot of enterprise corporations and still has a strong development community behind it.
In short: probably not. Unless you're trying to use a very old website which still relies on Java Applets, you probably don't need it.
In fact, most modern web browsers don't even support the Java plugin any more! You won't be able to install and run it on Chrome, Firefox or Safari. You'd have to go digging for a much older version to find one that would still support it!
In short: probably! Although "good" websites won't require you to have JavaScript enabled (we believe JavaScript should nearly always be optional), you'll probably have a smoother time on the internet with it enabled.
If you want some fine-grained control over how JavaScript runs in your browser, you can use a browser extension/addon like NoScript (Chrome / Firefox) to JavaScript to work only on certain sites.
Hopefully that explains a little more about the differences between Java and JavaScript. In case it wasn't perfectly clear; you probably don't need the Java plugin installed in your web browser, but you probably want to keep JavaScript enabled.
What is JavaScript and what does it do?
Turn on/activate JavaScript.
What happens if you don't have JavaScript?
What are some of the concerns with JavaScript and security?
Does my browser already have JavaScript or do I have to install it?
Does JavaScript go out of date?
What is the percentage of websites that use JavaScript?
What are the reasons someone would disable JavaScript in their browser?
What restrictions are there that keep me safe?