Why cannot you run standard Java bytecode on Android?

1 votes
176 views
Harsh kumar srivastava asked 09-Jan-2018 in Technology by Harsh kumar srivastava
Why cannot you run standard Java bytecode on Android?

1 Answer

0 votes
Prateek sharma answered 09-Jan-2018 by Prateek sharma

you cannot run Java bytecode on android because android works on DVM (Dalvik Virtual Machine ) whereas for java bytecode you will need JVM (Java Virtual Machine).

since in Java .java file is compiled by java compiler into class file whereas in android. the class file is compiled into .dex file by the DVM and then that file is converted into .apk file (Android application package).