Thursday, 5 February 2015

Difference between VMWare and Java Virtual Machine

Difference between VMWare and Java Virtual Machine.

VMWare and the rest actually virtualize the hardware of the machine. The operating system running inside of a VMWare container (or Parallels or Windows' virtualization containers or Bochs or ...) have varying degrees of awareness of running within a virtualized container. Within VMWare, the operating system has no idea that it is running within a virtual container. The operating system is not modified at all, although specialized drivers are usually installed (most importantly video) to prevent performance problems. Some other VM's don't do full hardware virtualization and instead require the OS inside the container the make special calls to the container in place of the regular hardware calls.

The JVM is not a virtual machine in that sense at all. No hardware other than the processor is virtualized. The JVM is essentially a virtualized CPU plus the same sort of runtime that is included with a C++ or any other object oriented language, plus garbage collection and other necessities. Additionally, of course, Java class files (and JAR files, etc) are not machine code, but an intermediate byte code. So the JVM has to compile or interpret class files (whether contained in a JAR file or not) at runtime, and has the ability to load and find new code dynamically at runtime.
The JVM is called a virtual machine because the JVM definition defines an abstract machine. This includes registers, stack, etc, and the byte code that Java source is compiled to is practically machine code for this virtual machine. The JVM then interprets or compiles this byte code into native machine instructions.The difference is essentially that the JVM is a virtualized processor and the other virtual machines are virtualized machines (including video card, network, and other external devices and hardware registers)

No comments:

Post a Comment