Example & Tutorial understanding programming in easy ways.

What is JVM (Java Virtual Machine)?

JVM (Java Virtual Machine) is an abstract machine. It is a specification that converts a program in Java bytecode (intermediate language) into machine language and executes it. The Java Virtual Machine (JVM) is the runtime engine of the Java Platform, which allows any program written in Java or other language compiled into Java bytecode to run on any computer that has a native JVM. JVMs run in both clients and servers, and the Web browser can activate the JVM when it encounters a Java applet.

JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each Operating System differs. But, Java is platform independent.

The JVM includes a just-in-time (JIT) compiler that converts the bytecode into machine language so that it runs as fast as a native executable. The compiled program can be cached in the computer for reuse.

The JVM performs following main tasks:
1 Loads code
2 Verifies code
3 Executes code
4 Provides runtime environment

Read More →