All language compilers translate source code into machine code for a specific computer.
Java compiler also does the same thing, Java compiler produces an intermediate code known as bytecode for a machine that does not exist. This machine is called the java virtual machine and it exist only inside the computer memory.
It is a simulated computer within the computer does all the major functions of the real computer.
Java compiler also does the same thing, Java compiler produces an intermediate code known as bytecode for a machine that does not exist. This machine is called the java virtual machine and it exist only inside the computer memory.
It is a simulated computer within the computer does all the major functions of the real computer.
The virtual machine code is not machine specific.
The Machine specific code is generated by java interpreter.
Diagram below represents how java works on a typical computer. The java object framework (Java API) acts as intermediary between the user programs and the virtual machine which in turn acts as intermediary between the operating system and the java object framework.



Comments
Post a Comment