Saturday, October 1, 2011

JVM

Jvm-Java virtual machine.
Jvm is both S/W and H/W.
JVM is platform dependent but it makes Java platform independent.
Jvm execute java code.
Jvm has compiler and interpreter.
Compiler: javac (Which is developed in java language)
Source code ----javac---->Byte code.(.class file)



Byte code is in machine code(0,1).
(We see in encrypted form when we open a class file in notepad.)

Interpreter: java (Which is developed in C language.).
Byte code------java----->Native code.(Result)



JVM's works in JRE:
1. To load the class : Class loader.
2. To verify the byte code: Byte code verifier.
3. To run the program.

In 2005, JIT(just in time) compiler launched.
JIT read all bytecode and give the native code.
Jit compiler is called by jvm when necessary.

2 comments: