Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are Android applications real Java applications

Tags:

java

android

apk

I have a simple question that has been bugging me for some time.

When you write an Android application, is it a Java program? More precisely, is this code executed on a Java VM, or is it simply that we use Java language to write a program that is compiled into Android byte code?

The fact that the JDK is required would suggest that the compiling is done into Java byte code, but the file that results from the compiling is the APK file, which is not a standard Java file. Can someone explain what actually happens when an Android application is compiled?

like image 310
Igor Ševo Avatar asked Oct 20 '22 20:10

Igor Ševo


1 Answers

Android java code is compiled into java byte code. That is then compiled again into Dalvik and run on the Dalvik VM. One of several reason for that extra step is the licensing that Sun has on the JVM. If we were required to use Sun's JVM, they would clearly have a problem with that. As the person noted above, the wiki link is here: http://en.wikipedia.org/wiki/Dalvik_(software)

like image 105
Brad Avatar answered Oct 24 '22 10:10

Brad