What is Android and why did they create a new VM?
Android's embedded OS relies on the Linux kernel for core system services but is not embedded Linux and thus standard utility libraries like for example GNU C are not supported. The Java framework is used to write Android applications but Android is not Java. Standard Java libraries such as Swing are not supported.Android has a Virtual Machine known as Dalvik, so when the Java class files are generated, this are translated to Dalvik Executable files known as .dex files. From this point this files 开发者_Go百科are not treated as java bytecode but as .dex files.
So I have three questions:
- Now I know what Android is not, so, what is Android?
- What are core system services?
- Why did they choose
.dex
files upon Java bytecode? I mean why did they took the work to translate or combine.class
files to.dex
files?
The What is Android? article on the developer site describes best what Android is.
Why did they choose .dex files upon java bytecode? i mean why did they took the work to translate or combine .class files to .dex files?
That is because they needed a more efficient virtual machine. Their virtual machine called DalvikVM was optimized for low memory requirements.
You can read more about the DalvikVM in this Wikipedia entry. Make sure to checkout the external links section on that page.
精彩评论