Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q477 Is JavaScript the same as Java?

irt.org | Knowledge Base | JavaScript | General | Q477 [ previous next ]

Q477 Is JavaScript the same as Java?

No. Enumerating all the things that Java can do which JavaScript cannot or vice versa will fill up an entire tome by itself, what we are trying to present here are some of the differences which are a Must Know for web designers and programmers.

Feature

Java

JavaScript

Creators Sun Microsystems Netscape
Type of Language Byte Compiled Object Oriented Smaller Object Oriented type Interpreted Scripting Language
Stand alone applications Can be created Cannot be created
Applet Creation Possible No
File input/output Can read and write files from and to server but nothing can be written on clients machine Can write cookies to clients machine, and embed *.js files from the server
Run Time Libraries JVM (Java Virtual Machine) Java Runtime Lib required JavaScript runtime libraries required

Don't worry these libraries are built into Java and JavaScript compatible browsers

Image Manipulation Possible right up to pixel color level No image manipulation possible, other than image replacement
Animation Possible Limited
Drawing Possible No
Multi threaded programs Possible No
Networking / Sockets Possible No
Cross Platform More stable and reliable Less Reliable
The problems with cross platform compatibility in JavaScript arise mainly due to differences in the object models implemented in the two major browsers - Netscape Navigator and Microsoft Internet Explorer
Tools Need to write and test Java Development Kit (JDK) Nothing Special is needed, you can get by with Notepad in Windows
Compilation Needs to be compiled before executing No need for compilation

JavaScript and Java are two totally separate languages. The fact that they are similarly named is not important.

It is however possible for the two languages to communicate with each other in Netscape Navigator using a technology called LiveConnect.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.