Working of Java Virtual Machine (JVM)

JVM(Java virtual machine):it is the runtime environment for java programs and it contains the following :
1)class loader
2)byte code verifier
3)jit compiler and interpreter
java is a platform independent language which means it can be operated in any operating system

when you execute a program in C && C++ a .exe file is obtained which contains the source code
and operating system details where as when you execute a program in java a .class file is created which contains the byte code(source code) only.It is the JVM which links this byte code with the operating system details.
The Java Virtual Machine forms part of a large system, the Java Runtime Environment (JRE). Each operating system and CPU architecture requires a different JRE. The JRE comprises a set of base classes, which are an implementation of the base Java API, as well as a JVM. The portability of Java comes from implementations on a variety of CPUs and architectures. Without an available JRE for a given environment, it is impossible to run Java software.

No comments:

Post a Comment

Please Provide your feedback here