How Java Virtual Machine can work on system without virtualization support?

后端 未结 6 789
孤城傲影
孤城傲影 2021-01-20 20:05

If hardware support is a must for virtualization, how can Java Virtual Machines run on machines without support for virtualization ? Or is JVM not a virtual machine ?

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 20:57

    The JVM is a virtual machine for running Java, in other words it emulates a machine which would be capable of running java. It is a confusing choice of names, but it comes from the general meaning of "machine" not from the more common Virtual Machine meaning.

    The JVM, like a regular VM emulates the execution of instructions, but in the case of the JVM the instructions being emulated are Java Instructions, and in the case of a VM they are Hardware Instructions as would be executed by an OS running on the same hardware.

提交回复
热议问题