Wednesday, November 3, 2010

JVM-the Heart of JAVA

JVM-JAVA VIRTUAL MACHINE-(lay man answer)...think differently...yes!!! I can put it this way..
JVM is a set of programs that is assigned with many tasks....then why it is called a virtual machine...we know MACHINE performs many tasks and this is what is done by JVM, since it is a software and all the tasks performed by it are done by programz(that are not seen),it is called virtual machine
As I already said JVM is assigned with many tasks,u might probably think of what tasks they could be???
well!!
  • JVM loads byte code to RAM.
  • Searches and locates the functionality.
  • It converts the functionality into executable code of the correspondig operating system.
  • Allocates memory and loads the executable code of the current functionality.
  • Maintains the executable code in the RAM.
  • Makes processor to execute the current functionality.
  • Deletes the executable code of the function once its execution is complete.
these are the tasks performed by JVM,hence u can call it a virtual machine.

How can we say that JVM is responsible for platform independency????
As we already know that JVM converts bytecode to executable code,only this part of the program is designed according to the operating system compatibility,hence ,therefore u need not change the entire software of java into OS compatible,and we already know JVM is so small in size,easily downloadable,itis not taken into account at all,hence JVM plays a key role in making JAVA Platform Independent.
AND a Key point to remember,it is through JVM we implement the concept of 'Dynamic loading',that is allocating memory to the variables at run-time.
Thus , we can say JVM is the heart of JAVA

No comments:

Post a Comment