What is the difference between a Java virtual machine and a VMWare VM?
I know that they are both called 'virtual machines', but what is the exact difference?
The term virtual machine is a colloquialism in that it simply refers to the idea of a machine (not the actual thing itself). Due to this it can refer to almost any piece of software (hence the virtual) that "acts" like a machine. A video game emulator is a virtual machine (and actually quite like how the JavaVM works).
The biggest difference between types of virtual machines is in what they virtualize and how they do it (i.e. how they abstract the idea of a machine).
VMWare (VirtualBox/etc.) attempt to present the hardware on the host machine to the guest machine so the guest machine can use the hardware directly (like being able to use a USB device on the guest) and in this context not much is actually virtualized (in the classic sense of the word) since the guest uses the hardware itself. To this, VMWare/etc. are more like hardware proxies more so than a "virtual machine". Software built for one platform/architecture will still only run for that platform/architecture regardless of virtual machine guest/host.
As for Java, it's more proper to say "the" Java Virtual Machine, more than "a" Java virtual machine; the JVM attempts to abstract the hardware and machine itself so the developer doesn't have to concern themselves with things like architecture type or platform. Software built with Java should run on any platform that has the proper JVM version installed, regardless of physical machine type.
The difference between these two concepts of a virtual machine is in abstraction and running code natively (i.e. direct on the hardware). The JVM attempts to abstract as much of the platform/architecture/machine as possible to make the code as agnostic as possible to be able to run on as many devices as possible (that support Java), where as a VMWare/VirtualBox container abstracts the physicality of the machine as much as possible so you can reduce the physical hardware needed to run a platform, though you still have the same soft limitations (e.g. I can't write ARM assembly and expect it to 'just run' on an x86 processor in VMWare/VirtualBox).
There's quite a bit more detail that could be explained in the 'exact' differences between these 2 types of virtual machines (more so than say comparing the JVM to .NET or the WINE emulator), but that gets into lower level systems design; at a high level though, this should help explain the key differences between the JVM and a VMWare VM.
I hope that helps to add some clarity.
The main difference is the underlying machine. With Java, it is a well specified ad hoc pure software machine with its own machine language (bytecode) while with VMWare (or VirtualBox, etc.), the underlying machine presented is close to a physical PC using the same machine language as the real hardware (x86).