Motivation for creating JVM


Motivation for creating Java/Java Virtual Machine


Compile once Execute in all Environment:

With the availability of multiple Operating Systems and the immense growth in Distributed Computing arena, the software industry increasingly vouched for a Platform Independent Programming Language.  Java/JVM fulfilled the gap by dividing the compilation and execution model.
  • Compilation -- Java Compilers created binaries (.class file) not specific to the Instruction Set of the Host machine but to that of the Java Virtual Machine and the Binary format remained independent of the underlying OS.
  • Execution -- Platform Dependent Execution Engines (JVM) interpreted and executed JVM specific Instruction Set contained in .class files.
This resulted in an immense opportunity to write Network Mobile Code like Java Applet. This also provided immense opportunity for Network Shared Object communication model, where objects created by any machine can be shared and understood by any other machine as long as it had a JVM on that machine specific to its platform. 


Non-VM based Compiled Language (c, c++ etc)


VM based Compiled Language (Java)

Compilation:



Execution:


No comments:

Post a Comment