The Right Environment
×
Home Courses Community Support
Gray Matter

First Step Towards Android: Introduction »

Understanding Activities and Intents »

Hands On With UI Designing In Android (Controls-Views,Widgets and Layouts) »

Updating... »

The Right Environment

You will be astonish to know that you can start your Android application development on either of the following operating systems –

  1. Microsoft Windows XP or later version.
  2. Mac OS X 10.5.8 or later version with Intel chip.
  3. Linux including GNU C Library 2.7 or later.

Second thing is that all the necessary tools to develop Android applications are available free of cost and can be downloaded from the Internet. Before you start your Android application programming you’ll need softwares-

  • Java JDK5 or later version
  • Android SDK
  • Java Runtime Environment (JRE) 6
  • Android Studio
  • Eclipse IDE for Java Developers (optional)
  • Android Development Tools (ADT) Eclipse Plug-in (optional)

The last two components mentioned above are optional and if you are working on Windows machine then these components will make your life easy while doing Java based application development. So let us have a look how to proceed to set required environment.

Now before you install any of the IDE onto your machine you’ll have to setup the Java Development Kit (JDK)

Set-up Java Development Kit (JDK)

To download the latest version of Java JDK you have to visit Oracle's Java site i.e Java SE Downloads. Or you can go to this link http://www.oracle.com/technetwork/java/javase/downloads/index.html. You will find instructions for installing JDK in downloaded files, follow the given instructions to install and configure the setup.

Finally you have to set PATH and JAVA_HOME environment variables to refer to the directory that contains java and javac, typically java_install_dir/bin and java_install_dir respectively.

If you are running Windows and installed the JDK in C:\jdk1.6.0_15, you would have to put the following line in your C:\autoexec.bat file.

set PATH=C:\jdk1.7.0_75\bin;%PATH%
set JAVA_HOME=C:\jdk1.7.0_75


Alternatively, you could also right-click on My Computer, select Properties, then Advanced, then Environment Variables. Then, you would update the PATH value and press the OK button.

On Linux, if the SDK is installed in /usr/local/jdk1.6.0_15 and you use the C shell, you would put the following code into your .cshrc file.

setenv PATH /usr/local/jdk1.7.0_75/bin:$PATH
setenv JAVA_HOME /usr/local/jdk1.7.0_75

Alternatively, if you use an Integrated Development Environment (IDE) Eclipse, then it will know automatically where you have installed your Java.

There are two ways to set java path:

  1. Temporary
  2. Permanent

1. Set Temporary Path of JDK in Windows

To set the temporary path of JDK, you need to follow following steps:

  • Open command prompt
  • Copy the path of jdk/bin directory
  • Write in command prompt: set path=copied_path

For Example:  set path=C:\Program Files\Java\jdk1.6.0_23\bin

Let's see it in the figure given below -


2. Set Permanent Path of JDK in Windows

For setting the permanent path of JDK, you need to follow these steps:

Go to MyComputer properties -> advanced system setting tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok

See below images if you unable to set permanent path-

Go to MyComputer properties

Click on Advanced Syatem Setting Tab


Click on Environment Variables


Click on new tab of user variable


Write "Path" in Variable Name


Copy the path of BIN Folder


Paste the path of bin folder in variable value


Click OK -> OK -> OK

Now your permanent path has been set. You can now execute any program of java from any drive. Also you can now setup your IDE for android application development.

Setting Java Path in Linux OS

Setting the path in Linux OS is same as setting the path in the Windows OS. But here we use export tool rather than set.

Let's see how to set path in Linux OS:

export PATH=$PATH:/home/jdk1.6.01/bin/


Here, we have installed the JDK in the home directory under Root (/home).

Now we can setup our IDE.

 

← Preview

Android Architecture

Next →

Setting up Android Studio, ADT and Eclipse

NOTES

Our mission is to provide highly effective and quality education via innovative solutions. Geeksdemy look forward to bridge the gap between in-demand technology and academics in order to deliver innovative, easy, interesting and affordable learning across the Globe.

Courses

  • Python
  • Game Development with Unity 3D
  • Arduino
  • PCB & Circuit Designing
  • Robotics and Embedded C
  • 8051/8052 Embedded Systems
  • QuadCopter & UAV
  • MATLAB with Robotics
  • Raspberry Pi
Learn On the Go!
Get the Android App
Get the iOS App