JVM vs Virtual Machine
A virtual machine in the cloud acts like a whole computer and runs a full system. The JVM is just a program. It only runs Java bytecode.
Java Virtual Machine (JVM)
The runtime that runs Java bytecode. It works on any machine that has one.
The Java Virtual Machine, or JVM, is the runtime that runs Java programs. The Java compiler turns code into bytecode, kept in .class files. The JVM runs that bytecode on any computer that has a JVM. It turns busy code into machine code as it runs. It also cleans up memory for you. Kotlin, Scala and Clojure make bytecode for the JVM too.
Virtual Machine (VM)
A whole computer made in software. Lots of them can share one real box.
A virtual machine is a whole computer made in software. It has its own processor, memory, disk and system. All of them are borrowed from a real machine. Programs inside it act as if it were a real computer. Many virtual machines can share one server. You can start, stop, copy or delete one in minutes.
In one line
- Java Virtual Machine (JVM)
- The runtime that runs Java bytecode. It works on any machine that has one.
- Virtual Machine (VM)
- A whole computer made in software. Lots of them can share one real box.
These live in different corners of the glossary (Development and Infrastructure), which is exactly why they get confused.