Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Whats the difference between the Java VM (Virtual Machine) and a JIT (Just-In-Time compiler)?

0
Posted

Whats the difference between the Java VM (Virtual Machine) and a JIT (Just-In-Time compiler)?

0

The Java VM is what executes Java programs. The Java VM comes bundled with the more advanced Web browsers, such as Microsoft Internet Explorer, or in the Java SDK. The VM itself is a virtual processor emulated in software. The instructions, called Java bytecodes, for that virtual processor are the same no matter which operating system the VM is running on. The virtual machine reads the bytecode and executes the native instructions appropriate for the local operating system. This is what gives Java its machine-independence. JITs are plugged into the Java VM. When the VM executes a method in a class or object, it passes bytecodes to the JIT, which then compiles the bytecodes to native code on the fly. Without a JIT, the Java VM must interpret and execute each bytecode in succession—a much slower process. Consequently, a JIT significantly boosts Java performance.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.