What is the use of JVM if JIT is performing bytecode conversion to machine instructions

The JIT is just part of the JVM. Other parts include the bytecode interpreter, the class loading verification and linking mechanisms, and the native code support for stuff like reflection, I/O and so on.

In that sense, the JIT doesn’t make the JVM run faster at all. Instead it makes Java code run faster … than it would if the JVM just interpreted it.

In reality, the JVM does start out interpreting the bytecodes. After a period, the JVM then uses its JIT compiler to compile heavily used methods to native code, using statistics that were gathered while interpreting to tune the code for the problem at hand.

By the way, this part of the text that you quoted is clumsy and technically inaccurate:

A Just-In-Time (JIT) compiler is a feature of the run-time interpreter … (context)

In fact, the JIT is not a feature of the interpreter. Rather, the JIT is functionality of the JVM that works alongside the interpreter.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)