Wednesday, July 13, 2005

Platform Independence

Platform Independence

Java is created to develop network application. OO concept taken from C++ as a reduced subset of what was available in C++ and some restriction are being placed on some of OO concept like multiple inheritance. Since Java was created for networking application it have to be supported on many different platform, that’s where Java stand different than other programming languages.
Compiler being used to interpret the language semantic and syntax, and then converting it to executable form of that specified machine (here machine is used in context of hardware and OS running on it). But the problem lies here only that compiler can generate OS specific executables and compilers working on different machine has different specification (not major differences such as in MSWindows C you can use clrscr() to clear screen but in Linux C this function is not available etc) to follow, that make impossible to run one code developed on one machine to work on different machine without some modification.
Sun developed a Virtual Machine known as Java VM. This resides between java code and underlying machine. Whenever user want to compile and run a java code, the code passed to JVM which then compiles the code and convert it into byte code which can be used on any other machine. JVM create virtual OS for running executable code.
JVM also developed for many available machines, if it is available on the machine user can run any java code on that machine without any hesitation. JVM pretend java code that it running with the same machine without any modification. That is truly platform independence but needs JVM. So it is true ‘Write once run anywhere’.
DotNet come up with concept CLR ie. Common Language Runtime which specifically state that ‘Write in any language and run on one platform’, that gives us language independence (here language means that follows CLS ie. Common Language Specification).
This is one of the reason for people to use Java than any other language in the world.

1 Comments:

At 5:37 AM, Anonymous Anonymous said...

It's time to take charge of your future and independence by having your own business!

 

Post a Comment

<< Home