0% found this document useful (0 votes)
8 views

Android Lec-4

Mad

Uploaded by

anujchavan96k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Android Lec-4

Mad

Uploaded by

anujchavan96k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Course: Android Programming Prepared By: Atul Kabra, 9422279260

Android Lecture- 4 Chapter-2


Topic: Installation And Configuration of Android

What is JDK?
 JDK stands for Java Development Kit, It provides the environment
to develop and execute(run) the Java program. JDK is only used by Java
Developers.

 JDK includes two things


1. Development Tools (javac, java, jdb, appletviewer etc)
2. JRE (to execute your java program).

 JRE is an installation package which provides environment to only


run the java program onto your machine. JRE is only used by them who
only wants to run the Java Programs i.e. end users of your system.

 JVM Whatever Java program you run using JRE or JDK goes into JVM and
JVM is responsible for executing the java program line by line hence it is
also known as interpreter.

 To understand the difference between these three, let us consider the


following diagram.
Course: Android Programming Prepared By: Atul Kabra, 9422279260

What is Android SDK?


The Android SDK (software development kit) is a set of development tools
used to develop applications for Android platform. The Android SDK includes
the following:
 Required libraries
 Debugger
 An emulator
 Relevant documentation for the Android application program interfaces
(APIs)
 Sample source code
 Tutorials for the Android OS
The most common way to use Android SDK is by using an IDE. The
recommended and official IDE is Android Studio. However, other IDEs, such as
NetBeans,Eclipse or IntelliJ, will also work. Most of these IDEs provide a
graphical interface enabling developers to perform development tasks faster.
Since Android applications are written in Java code, a user should have the
Java Development Kit (JDK) installed.

Android SDK consists of the compilers, utilities, build tools and packaging
tools to make and deploy android apps. Android SDK tools are mostly
command-line tools, which can be called from the unix shell or MS-DOS-style
(in Windows) command line and are not graphical.

Dalvik Virtual Machine (DVM) :


The Dalvik Virtual Machine is a version of the Java Virtual Machine that is
optimized for low power handheld devices i.e. mobile devices. The DVM
optimizes the mobile system for battery life, memory and performance in
general.
Programs intended for Android are first written in Java and later compiled
to bytecode for the JVM. After that, this bytecode is translated to Dalvik
bytecode and stored in .dex files. These are Dalvik executable and
Optimized Dalvik executable files respectively.
Course: Android Programming Prepared By: Atul Kabra, 9422279260

A figure that illustrates the working of the Dalvik Virtual Machine is given as
follows:

Difference between JVM and DVM


JVM DVM
It is register based which is designed
It is stack based runs on high memory
to run on low memory.

JVM uses java byte code and runs DVM uses its own byte code and runs
.class file having JIT ".dex" file. From android 2.2 SDK
Dalvik has got a JIT

Single instance of JVM is shared with DVM has been designed so that a
multiple applicationss. device can run multiple instances of
VM efficiently. Applications are given
their own instances.

JVM supports multiple operating DVM supports Android operating


systems. system only.

For JVM many Re-tools are available. For DVM very few Re-tools are
available.

Here the executable is JAR. Here the executable is APK

It has constant pool for every class. There is constant pool for every
application.

You might also like