Java vs javascript โ€“ who won this fight?

Let me show only numbers and bits of facts, which will make you think๐Ÿค”

Finding a freelance job

Let's browse Upwork, the most popular freelancing platform in the world:

https://www.upwork.com/freelance-jobs/java/:

java freelance jobs

Now https://www.upwork.com/freelance-jobs/javascript/:

javascript freelance jobs

Free or commercial

Most popular JavaScript interpreters are built on top of Open-Source V8 engine are NodeJS and Chromium Browser. And both are also are Open Source, so of course are free.

js world full of sweet opensource

Java? After 2019 โ€“ already not free. Java is owned by Oracle which asks you to pay for it. From wikipedia:

Oracle released for the legacy Java 8 LTS the last zero-cost public update in January 2019 for commercial use, although it will otherwise still support Java 8 with public updates for personal use up to at least December 2020

Yes, there is an open source Java implementation called OpenJDK, which has ~6.6k stars on GitHub:

jdk github stars

Lets consider NodeJS stars on GitHub:

node github stars

What community is bigger? If there would be some issue which community will report it and fix it faster? If you would need help which community would help you with a bigger probability?

Popularity by devices

As Java states on the installer screen "Java runs on 3 billion devices":

3 billion devices run java

Probably it runs, but as we can see it is ATMs, Smartcards, POS Terminals โ€“ they all could not be programmed by most of the developers.

JavaScript runs in every modern browser which is preinstalled on almost all devices inside of the Operation Systems. According to Gartner data 2.4 billion devices were sold every year if we are talking about e.g. 2015, 2016, 2017. So image how many billion devices run JavaScript?

Plus a lot of so-called devices that "run Java" also run JavaScript in nodejs interpreter.

A lot of servers run JavaScript in nodejs environments.

Google searches

Yep, Java was pretty popular in the beginning of 200x:

google searches

Actually, we think this is also a result of a good marketing strategy which still makes you compare java with javascript.

Github popularity

Let's consider some statistics from research performed on this page: https://madnight.github.io/githut/#/pull_requests/2020/3 , results are pretty reliable, but you can check how they got it here

githut java vs javascript

What do you need to run it?

To run JavaScript โ€“ if you are reading it from the desktop โ€“ open developer tools and put your javascript there.

To run Java? You need to download and properly install some runtime that is binary.

Editor conclusion

According to all trends, we see that JavaScript popularity and usage grows and we think it will grow in the future. Mentioned commercial support by Oracle made a final shot in Java language.

JavaScript is truly async language that is nowadays successfully used to build:

1. Frontends for Web Portals

2. Asynchronous high-load backends

3. Mobile applications

4. Desktop software

5. Embedded software

6. Automation scripts

JavaScript is easy to run, which makes it easy to learn, easy to use.

Java vs javascript cup?

#javascript #java #nodejs
4
Bruce Hardy profile picture
Nov 21, 2020
by Bruce Hardy
Did it help you?
Yes !
No

Best related

This is wrong, a very biased analysis. Before Sun was bought by Oracle, they made sure to release the Java Development Kit (JDK) as free software (OpenJDK) so Oracle couldn't put their claws on it but instead contribute to OpenJDK as they want to bring Java forward.

Oracle made it look like you need to have paid support, but this doesn't affect the vast majority (99,9%) of customers as they can just use OpenJDK for free (as opposed to OracleJDK). Also, more and more companies (Microsoft, Amazon, Azul, etc.) are stepping up and providing their own OpenJDK releases.

Then for JavaScript, you need a VM to run it as well. Conveniently, browsers already contain a VM, for Java you need at least a JRE (Java Runtime Environment). What point are you trying to make with the binaries? Are you building all your software from source, or are you downloading binaries in most cases, even if the software is open source?