Friday, August 28, 2009

Java is portable not its JVM

"Java is portable" has become the ubiquitous quote in the technological world and this is one of the reasons for the popularity of Java.

But what is the logic behind its portability. It is simple. There is a JVM - Java virtual machine , which will convert the java byte code into native code.

So Code is compiled into a byte code which is architecturally neutral and this code is then converted to machine((OS) dependent code by the JVM specific to the OS.

Thats smart is not it. Write once Run Everywhere .....

JVM is basically an interpreter that interprets the class files and is different for different OS.

No comments: