What is the difference between DVM and JVM?

Viewed 64292

What is difference between Java Virtual Machine and Dalvik Virtual Machine?

8 Answers

Dalvik VM can't execute Java bytecode(.class) It has to be(.dex)

Oracle JVM has stack based architecture & Dalvik has register based architecture.

JVM suppost to multiple operating system. (it is open source) but DVM supported for Android Operating system (before comming android 5.o android used the DVM)

Here is a tabular comparison(Source: Mr. Atul):

enter image description here

enter image description here

Here, We can get the basic difference among the JVM (Java Virtual Machine) and DVM (Dalvik Virtual Machine). From figure it is obvious that DVM can run only .dex files. Dex compiler takes all .class (can be executed by JVM) files for all the classes belongs to application and convert all of them into a single .dex file. Later .dex file is executed by DVM. Additionally, .class files resulted by Javac (java compiler) from .java->.class.

Related