![]() APJ Abdul Kalam University, Lucknow (India). Himanshu Verma has graduated from the Dr. Subscribe my mailing list to get the early access of my articles directly in your inbox and Don’t forget to follow my own publication on Medium The Code Monster to polish your technical knowledge. I hope you liked reading this article, you can also visit my website where I keep posting article regularly. JVM will work based on byte code and the DVM will work based on optimized bytecode, it is optimised for mobile platforms because mobile devices have less memory, low process and low power that’s why it is using the linux kernal. DVM takes less memory, runs and loads faster compared to JVM.JVM was designed for desktops and it is too heavy for embedded devices.Though JVM is free, it was under GPL license, which is not good for Android as most the Android is under Apache license.There are couple of reasons why Google not choose JVM over DVM, so let’s understand each one of them one by one. Since bytecode is an intermediate code so you can give it to anyone to run it on any platform that’s why we call Java applications WORA (Write Once and Run Anywhere).Ĭredit to Why Android OS uses DVM instead of JVM? Bytecode is intermediate code which means humans can not understand this code and this code is not machine/platform dependent. JVM is platform dependent and different implementations are available for specific platforms.įor example, If you have a Hello.java class and when you run this class file then javac compiler turns your source code to bytecode and creates Hello.class file which means javac compiler does not convert Java code directly to machine code like other compiler does. Why Android OS uses DVM instead of JVM?Ī Java virtual machine ( JVM) is an abstract layer between the Java program and the platform the Java code is running on.So in this guide, I’m going to answer the following questions The answer to this question was not easy for me at that time because I was just getting started. The question was why java bytecode can run on any machine or platform and how it is different from the other code?. When I was learning Java programming seven years ago from now, I used to ask a lot of questions from myself and friends about this marvellous language but there was one question which popped up most of the time until I didn’t find the satisfactory answer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |