We know that JAVA has several types of vitual machine supported. Why it's needed where Java could run based on one single/standard JVM? Why does java support different types of JVMs such as CVM, KVM?
Asked
Active
Viewed 291 times
-1
-
JVM implementations are written according to a JVM spec. Its left to the people writing JVMs to ensure that everything works fine – TheLostMind Dec 01 '15 at 10:50
-
Because they are reference implementation as Vlnod mentioned they are following a spec – HRgiger Dec 01 '15 at 11:08
-
It's not clear what you are asking. Why wouldn't different implementations be implemented different ways? – Peter Lawrey Dec 01 '15 at 12:13
-
The answer is: It doesn't. It is not Java that supports different JVMs. It's the different JVMs that support Java. – Ingo Sep 18 '16 at 20:31
1 Answers
1
When java was invented theire was a specification generated, which describes how to excecute the ByteCode produced by the Java compiler.
The Reason for that was, that java initially was designed for set-up boxes and other small devices and not for servers or desktop computers.
Because these devices all had different Hardware and Operating Systems (If they had one) multiple implementions of the JVM where needed for different Hardware.
For today, this means that anybody can implement a JVM and its not under controll of the Company behind java. As a added benefit Java runs everywhere, from a smart card over a secure element in a Mobile phone, to some network devices and finally on a personal computer or a server.

Markus Knecht
- 430
- 4
- 10