JavaScript != Java

JavaScript != Java

Lately I've been doing a lot of work with Java and JavaScript through JavaScript Engine and every time I come to a question about the two someone feels the need to answer the question with,&nbsp;<em>"Java and JavaScript are two different languages. They have nothing in common!"</em>&nbsp;or&nbsp;<em>"Just because the word Java is in JavaScript doesn't mean its Java"</em>&nbsp;or&nbsp;<em>"Java != JavaScript"</em>.

Lately I've been doing a lot of work with Java and JavaScript through JavaScript Engine and every time I come to a question about the two someone feels the need to answer the question with, "Java and JavaScript are two different languages. They have nothing in common!" or "Just because the word Java is in JavaScript doesn't mean its Java" or "Java != JavaScript".

Well OK... That doesn't answer the question and it is so irrelevant because you can obviously use Java inside of JavaScript and you can use JavaScript inside of Java so just because someone is asking a question about the two doesn't mean they think they're are the same language.

So my question is how come so many people seem to get worked up over the fact someone is trying to use Java and JavaScript together and will dismiss the question with their condescending phrases instead of offering a solution?

Here is an example,

var SwingGui = JavaImporter(Packages.javax.swing,
                    Packages.javax.swing.event,
                    Packages.javax.swing.border,
                    java.awt.event,
                    java.awt.Point,
                    java.awt.Rectangle,
                    java.awt.Dimension);
...

with (SwingGui) { var mybutton = new JButton(test); var mypoint = new Point(10, 10); var myframe = new JFrame(); ... }

sources:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java

http://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/

http://www.oracle.com/technetwork/articles/javase/scripting-140262.html

javascript java

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Install OpenJDK 11 on CentOS 8

What is OpenJDK? OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE).

Java vs. JavaScript: Know The Difference

Java vs. JavaScript: Know the Difference, Java vs. JavaScript: What's the Difference? Java vs. JavaScript: Major Similarities and Differences. pros and cons of JavaScript and Java.

Java vs JavaScript | Difference Between Java And JavaScript

Java vs JavaScript | Difference Between Java And JavaScript. There are so many tools available in the world of programming that it’s easy to confuse them. It doesn’t help when many of these tools appear to overlap and perform the same functions. It seems that the toughest part of web design or code writing is choosing the right resource to use. This article presents the differences between Java and JavaScript.

Java vs JavaScript: Difference between Java and JavaScript

The video on Java vs JavaScript provides you with a short and crisp description of the two programming languages. You will also see the head to head comparison between the two on various aspects and learn the similarities and differences between them.

Java Core (2020) | Java for beginners | Brush up your Java Skills | Get Hired

In this video we will learn about all the major concepts that come under Java Core . The course is very carefully designed and is made with keeping simplicit...