Tuesday, December 13, 2016

Java Basic -How JVM Works – JVM Architecture?

JVM(Java Virtual Machine) acts as a run-time engine to run Java applications. JVM is the one that actually calls the main method present in a java code. JVM is a part of JRE(Java Run Environment).
Java applications are called WORA (Write Once Run Everywhere). This means a programmer can develop Java code on one system and can expect it to run on any other Java enabled system without any adjustment. This is all possible because of JVM.
When we compile a .java file, a .class file(contains byte-code) with the same filename is generated by the Java compiler. This .class file goes into various steps when we run it. These steps together describe the whole JVM.



Image Source : https://en.wikipedia.org/wiki/Java_virtual_machine