Java Virtual Machine (JVM)

The Java Virtual Machine is called JVM, is an abstract computing machine or virtual machine interface that drives the java code.
When we talk about the Java applications, then it works on those machines which have JVM.
  • JVM stands for Java Virtual Machine.
  • JVM is the engine that drives the java code.
  • Mostly in other Programming Languages, compiler produce code for a particular system but Java compiler produce Bytecode for a Java Virtual Machine.
  • Bytecode is an intermediary language between Java source and the host system.
  • It is the medium which compile java code to bytecode which get interpret on different machine and hence it makes it Platform/Operating system independent.
Diagram of JVM
JVM generates a .class(Bytecode) file, and that file can be run in any OS, but JVM should have in OS, because JVM is platform dependent.

Platform Independent

Java is called platform independent because of Java Virtual Machine. As different computers with different operating system have their own JVM, when we submit ‘.class‘ file to any operating system, JVM interpret the bytecode into machine level language.
  • JVM is the main component of Java architecture and it is the part of the JRE (Java Runtime Environment).
  • A program of JVM is written into “C Programming Language” and JVM is Operating System dependent.
  • JVM is responsible to allocate the necessary memory needed by the java program.
  • JVM is responsible to de allocate a memory space.

Just-in-time Compiler (JIT)

JIT is the part of the Java Virtual Machine (JVM) that is used to speed up the execution time. JIT interpret parts of the bytecode that have similar functionality at the same time, and hence reduces the amount of time needed for full interpretation.


                                                                     ⏪ PREVIOUS PAGE          NEXT PAGE ⏩

No comments:

Post a Comment