473,748 Members | 4,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The difference between Java and JavaScript

TWJava and JavaScript are two different animals. ;-)

DHLOK Tom.
DHL>
DHLDefine the two.
DHL>
DHLTo me Java is the software that interprets and executes
DHLJavaScripts and Java Applets. [...]

It's a common conflation, but Java and JavaScript are two entirely
different programming languages. The language that you refer to, the
machine-independent language that runs in a virtual machine (using a
compiled bytecode) and that can be used standalone as well as to
provide applets in web browsers, is Java, for which one uses the Sun
Java Virtual Machine (or someone else's JVM). The other language,
JavaScript, is a script language that is only of real use in web
browsers and that cannot be used for standalone programs. Java was
invented by Sun. JavaScript was invented by Netscape.

I'm sure that there's a Frequently Given Answer on this subject
somewhere ...

.... ah, yes. Here you go:

<URL:http://dannyg.com./ref/javavsjavascrip t.html>
<URL:http://wdvl.internet.c om./WDVL/FAQ/WWW.html>
<URL:http://developer.irt.o rg/script/477.htm>
<URL:http://www.cacs.louisi ana.edu./~mgr/404/burks/language/java/index.htm>
<URL:http://ftp.ggi-project.org./javafaq/javafaq.html#xt ocid90007>
<URL:http://www.herts.ac.uk ./ltdu/technology/what_is_javascr ipt.html>
<URL:http://clarionmag.com/cmag/v1/v1n8understandi ngjava.html>

Jul 11 '06 #1
9 4272
Hi Everyone,
Java Virtual Machine (or someone else's JVM). The other language,
JavaScript, is a script language that is only of real use in web
browsers and that cannot be used for standalone programs. Java was
invented by Sun. JavaScript was invented by Netscape.
XUL uses JavaScript for its applications. Most Mozilla application are
written in XUL, thus use JavaScript. This also includes its mailer and
calendar applications. Its also used as a server-side language. So,
JavaScript is used outside the browser, though its mainly known for use
in the browser.

Vincent
Jul 11 '06 #2
J de Boyne Pollard wrote:
The other language,
JavaScript, is a script language that is only of real use in web
browsers and that cannot be used for standalone programs.
As I'm sure others will point out while ridiculing you, this is of course
not true.
Javascript can be used as a server-side language, as a scripting language
component of any app one wishes to write, and even for stand-alone programs
using WSH, for example.

However its most common use, by far, is in scripting web pages in browsers.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jul 11 '06 #3
Matt Kruse wrote:
J de Boyne Pollard wrote:
>The other language,
JavaScript, is a script language that is only of real use in web
browsers and that cannot be used for standalone programs.

As I'm sure others will point out while ridiculing you, this is of course
not true.
Javascript can be used as a server-side language, as a scripting
language component of any app one wishes to write,
Indeed it is probably the scripting language of choice for anyone
wanting to add a scripting facility to any application as interpreters
are available as open source code (and commercially), leaving only the
task of integrating them with the application code, and you can
leverage existing understanding of the javascript language (with the
probable alternative being to invent your own script language and for
all the users (who want to script the application) to learn it).
and even for stand-alone programs
using WSH, for example.
<snip>

That would probably depend on what you classed as "stand-alone". I
would say that JScript in WSH will not result in a stand alone program
as the script language is still scripting a host and that host is
providing all the file access and any UI/GUI (if possibly indirectly
through ActiveX components).

The ability to directly launch a 'program' written with JScript using
WSH from a windows desktop is not quite enough for me to call the
result 'stand-alone'.

Richard.

Jul 11 '06 #4
Richard Cornford wrote:
>and even for stand-alone programs
using WSH, for example.
That would probably depend on what you classed as "stand-alone". I
would say that JScript in WSH will not result in a stand alone program
as the script language is still scripting a host and that host is
providing all the file access and any UI/GUI (if possibly indirectly
through ActiveX components).
The ability to directly launch a 'program' written with JScript using
WSH from a windows desktop is not quite enough for me to call the
result 'stand-alone'.
"Stand-alone" is a relative/vague term. But are Perl scripts or Java apps
"stand-alone"? They both require an interpreter.

For that matter, what about .exe files which require DLL's to be installed
on the windows computer? Are they stand-alone? How about .exe files with
everything self-contained? They still make requests to the OS for file
services, etc, and would be worthless without the correct underlying OS.

I suppose if you want to get technical, the only truly "stand-alone" code is
op codes stored in memory for a specific chip. But even that relies on
hardware to transfer the instructions to the chip!

I think it would be fair to say that running javascript in "stand-alone"
mode requires an interpretter, much like most other scripting languages, and
that interpretter is commonly found on most computers these days.

But beyond that, I get bored with semantics ;)

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jul 11 '06 #5
From: "J de Boyne Pollard" <j.************ **@tesco.net>

TW>Java and JavaScript are two different animals. ;-)
|
DHL>OK Tom.
DHL>>
DHL>Define the two.
DHL>>
DHL>To me Java is the software that interprets and executes
DHL>JavaScripts and Java Applets. [...]
|
| It's a common conflation, but Java and JavaScript are two entirely
| different programming languages. The language that you refer to, the
| machine-independent language that runs in a virtual machine (using a
| compiled bytecode) and that can be used standalone as well as to
| provide applets in web browsers, is Java, for which one uses the Sun
| Java Virtual Machine (or someone else's JVM). The other language,
| JavaScript, is a script language that is only of real use in web
| browsers and that cannot be used for standalone programs. Java was
| invented by Sun. JavaScript was invented by Netscape.
|
| I'm sure that there's a Frequently Given Answer on this subject
| somewhere ...
|
| ... ah, yes. Here you go:
|
| <URL:http://dannyg.com./ref/javavsjavascrip t.html>
| <URL:http://wdvl.internet.c om./WDVL/FAQ/WWW.html>
| <URL:http://developer.irt.o rg/script/477.htm>
| <URL:http://www.cacs.louisi ana.edu./~mgr/404/burks/language/java/index.htm>
| <URL:http://ftp.ggi-project.org./javafaq/javafaq.html#xt ocid90007>
| <URL:http://www.herts.ac.uk ./ltdu/technology/what_is_javascr ipt.html>
| <URL:http://clarionmag.com/cmag/v1/v1n8understandi ngjava.html>

Thanx all for the information concernming the differences and similarity in the two
languages. I can only hope to soak in tghe information the next time such a discussion
comes my way. :-)

--
Dave
http://www.claymania.com/removal-trojan-adware.html
http://www.ik-cs.com/got-a-virus.htm
Jul 11 '06 #6
JdeBPThe other language, JavaScript, is a script language that is
JdeBPonly of real use in web browsers and that cannot be used
JdeBPfor standalone programs.

MKAs I'm sure others will point out while ridiculing you,
MKthis is of course not true.

I doubt it. Others will have actually read the 7 articles that I
linked to in my original message and noticed that they all say this, in
one way or another. The very first one even says it, pretty much word
for word, in boldface, so even speed-readers would find it hard to
miss.

MKJavascript can be used as [...] a scripting languagecompone nt

Which does not equate to "standalone ", nor to "real use".

MK>[...] for stand-alone programs using WSH, for example.

That's stretching the concept of "standalone " a long way.

Jul 11 '06 #7
MKJavascript can be used [...]as a scripting language
MKcomponent of any app one wishes to write, [...]

RCIndeed it is probably the scripting language of choice for anyone
RCwanting to add a scripting facility to any application [...]

In actuality, though, it isn't. In my experience, the scripting
languages of choice, that people incorporate into applications by
linking the script interpreters in, are REXX and Tcl.

RCthe probable alternative being to invent your own script
RClanguage and for all the users (who want to script the
RCapplication) to learn it

In actuality, the alternative is to use other scripting languages whose
interpreters have APIs, such as REXX and Tcl, which are also already
widely understood by users.

Jul 11 '06 #8
"J de Boyne Pollard" <j.************ **@tesco.netwri tes:
JdeBPThe other language, JavaScript, is a script language that is
JdeBPonly of real use in web browsers and that cannot be used
JdeBPfor standalone programs.

MKAs I'm sure others will point out while ridiculing you,
MKthis is of course not true.

I doubt it. Others will have actually read the 7 articles that I
linked to in my original message and noticed that they all say this, in
one way or another. The very first one even says it, pretty much word
for word, in boldface, so even speed-readers would find it hard to
miss.
Even JavaScript (the language created by Netscape Corp and currently
being developed by the Mozilla people) was originally also used in
Netscape's web server as a scripting language, so it's definitly
of real use in other than web browsers.

If we include a compatible language like JScript, then it's of use in
many places through the Windows Scripting Host. This also allows
for stand-alone JScript programs using the wscript executable, which
makes JScript scripts as standalone as Perl programs.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 12 '06 #9
JRS: In article <11************ **********@m73g 2000cwd.googleg roups.com>
, dated Tue, 11 Jul 2006 05:12:04 remote, seen in
news:comp.lang. javascript, J de Boyne Pollard
<j.************ **@tesco.netpos ted :
...
The other language,
JavaScript, is a script language that is only of real use in web
browsers and that cannot be used for standalone programs.
Javascript can be written and executed by a batch file running in a
Win32 MS-DOS Prompt, if the machine has WSH installed which is at least
usual. It has features which VBScript lacks.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk DOS 3.3, 6.20; Win98. ©
Web <URL:http://www.merlyn.demo n.co.uk/- FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demo n.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demo n.co.uk/batfiles.htm- also batprogs.htm.
Jul 12 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
24740
by: Steven Green | last post by:
I have a java app at work I used when I had Windows 98 and never had a problem. I did a clean install of Windows XP and of course Java was not included. I went to Sun, download Java 2 Runtime Environment, SE v 1.4.2 and Java 2 Runtime Environment SE v 1.4.1_01. The Java app will not work with WinCP. I have installed the Windows XP Service pack 1, IE service pack 1 and I have downloaded Netscape and Opera. The same problem happens in...
2
5920
by: Kkiely | last post by:
what is the difference?
11
9266
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
7
11084
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox, need to iterate through pages page2 - e.g. allow user to update the fields there) On page1 I have a bunch of checkboxes with the same name v1 but different values (= DB rowId).
1
9649
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
4
4051
by: Khan | last post by:
hi, i'm writing java code inside <body> tag of java script file. all the java code is executing at frame startup. how can i call that java code only when i click on a button. I can call jscript function on button click , but i want to call java code on button click. advise some solution.
9
41722
by: misdst23 | last post by:
Hi, I know I can call a static java method within javascript by using the <% ... %tags. But how can pass a javascript variable ? function thefunction() { var = javascriptvariable ;
2
3598
by: Navodit | last post by:
Hi I am new to Javascript and am not sure what is the difference between the following two statements: <script type="text/javascript"> ..... </script>
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.