• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Script and Java  RSS feed

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does java script uses JVM to run ??? If not how a browser can run a java code with out having da support of the JVM ? Is java script is a part (or Subset ) of java language ??
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi upul,

Javascript does not use a JVM
A browser needs a JVM if it wants to run Java code
(you always need a JVM to run Java code)
Javascript is not a subset of Java.

A lot of people find the names Java and Javascript confusing...

Herman
 
upul indrajith
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you ...........
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript and Java are two completely different things. What makes it confusing is that "JavaScript" also has "Java" in the name. If you look at the two languages, then at first sight JavaScript looks like Java, but if you look deeper you'll see that it works quite differently.

Netscape invented JavaScript long ago and implemented it in their Netscape browser - JavaScript is not an invention from Sun.
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:
Netscape invented JavaScript long ago and implemented it in their Netscape browser - JavaScript is not an invention from Sun.


If I remember correctly... Netscape invented LiveScript. Then Sun (I think it was Bill Joy) and Netscape wanted to leverage LiveScript. So they worked together to change LiveScript -- both to make it look like Java and to get it better integration with Java applets.

The resulting language was renamed to JavaScript.

Henry
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone on a usenet discussion group (way back when) once said:

Java is to JavaScript what Car is to Carpet.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!