This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Android and the fly likes Question on bytecode - Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Question on bytecode - Android" Watch "Question on bytecode - Android" New topic

Question on bytecode - Android

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9752

As far as I understand, we write Android apps using Java but is the compiled source a Java byte code or some other format?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Imran Mohd
Ranch Hand

Joined: Mar 02, 2009
Posts: 38
The java Program which we have written will be converted in JavaByteCode and than this JavaByteCode is converted in to Dalvik bytecode by Using "dx" tool

java.txt--->javabytecode-----> Dalvik bytecode------> Dalvik virtual Machine

Mohd Imran (SCJP 1.5)
Monu Tripathi

Joined: Oct 12, 2008
Posts: 1369

The JavaByte code of your compiled class is converted to something called as Dalvik executables or (.dex) files, using the "dx" tool bundled with the SDK . The application is packaged into .apk file(zipped .dex files) The Dalvik virtual machine runs Dalvik executables in the apk file.

You may want to read this for details of .dex file format.

[List of FAQs] | [Android FAQ] | [Samuh Varta]
wood burning stoves
subject: Question on bytecode - Android