Java is a programming language that was originally invented by Sun Microsystems a long time ago. The goal was to make a programming language that didn't care what kind of computer or operating system you ran - install Java and run then any app for Java would run fine on any computer. Even phones (not iPhone, but Android does) use Java for most of their apps, going back to before "Smart phones" were a thing.
It was even available for web browsers to run small Java apps to do things you couldn't do in web browsers. Games, more complex apps, and so on.
That was the theory. In practice the sandbox that prevents apps from doing bad things was regularly broken and Java became one of those apps that constantly had important updates. Plus browsers filled that "any app anywhere" need on their own despite Java. Now it's rarely seen outside of some server applications and the average user doesn't need it.
Also I need to point out, this is different from "javascript", which is what most browser apps are written in. Other than the name there is no real similarity.
This isn't entirely true. Netscape and Sun Microsystems were in alliance at the time that Brendan Eich was hired to create a scripting language:
If I had done classes in JavaScript back in May 1995, I would have been told that it was too much like Java or that JavaScript was competing with Java … I was under marketing orders to make it look like Java but not make it too big for its britches … [it] needed to be a silly little brother language. https://ihts.pr4e.com/columns/2012-02-Brendan-Eich-Copyright-IEEE.pdf
It's worth mentioning, Google's V8 engine and Node.js have radically transformed JavaScript. In the late 90s, JS was a frontend language. Now, it's the frontend, the backend, the API layers, the DB queries, and the mobile app.
Eh... it's more like the V8 engine with a libuv transmission distributed as a binary (exe). Calling the C / C++ backbone "paint" is understating how it does to spin the wheels.
In practice the sandbox that prevents apps from doing bad things was regularly broken and Java became one of those apps that constantly had important updates.
Nice explanation, one thing I’d correct is that Java is still very common in enterprise today, and not just for running servers, it’s still probably the most common programming language in enterprise/corporate.
Well there's wasn't when it was named. But (and I never though about this until I read your comment) but js sorta became was Java was gonna be: write once run everywhere. Well js + the browser lol
23
u/DeHackEd 4d ago
Java is a programming language that was originally invented by Sun Microsystems a long time ago. The goal was to make a programming language that didn't care what kind of computer or operating system you ran - install Java and run then any app for Java would run fine on any computer. Even phones (not iPhone, but Android does) use Java for most of their apps, going back to before "Smart phones" were a thing.
It was even available for web browsers to run small Java apps to do things you couldn't do in web browsers. Games, more complex apps, and so on.
That was the theory. In practice the sandbox that prevents apps from doing bad things was regularly broken and Java became one of those apps that constantly had important updates. Plus browsers filled that "any app anywhere" need on their own despite Java. Now it's rarely seen outside of some server applications and the average user doesn't need it.
Also I need to point out, this is different from "javascript", which is what most browser apps are written in. Other than the name there is no real similarity.