Along with having high performance, JVM also has excellent memory management. However, for low-powered handheld devices, it needs to be optimized. Being an android virtual machine, the Dalvik Virtual Machine (DVM) is optimized for mobile devices. Thus optimizing the virtual machine for memory, battery life and performance. It was written by Dan Bornstein, where Dalvik represents the name of a town in Iceland. The class files are converted into the .dex file by the Dex compiler. This file runs on the Dalvik VM. It is not only a single file converted to a .dex file, but, multiple class files are converted into one .dex file.
javac tool:
The java source file is converted into the class file by the javac tool.
dx tool:
All the class files of an application are taken by a dx tool to generate a single .dex file. A dx tool is a platform-specific tool.
Android Assets Packaging Tool (AAPT):
The packaging process is handled by AAPT.