As I said yesterday, we will see how to develop the standard development environment for Android, that is, programming in Java using Eclipse as IDE. We will need various elements, but while the process is long, not too complicated if you know your operating system. In the example I’m using Ubuntu 12.04, but there are too many differences to prepare it in Windows or Mac
To begin with we must distinguish the steps that follow. First we will need the development tools for Java, JDK, then install the IDE (Eclipse) and finally get it ready to develop for Android.
This is the development toolkit for Java. It is possible that you may have already installed the Java Runtime, but this only serves to make Java applications able to run, to develop we will need both the JDK can coexist in different versions, and if you have the Java Runtime, the JDK, once installed includes one. You can download it here. You will have to check the box to accept license agreement and select the file to download depending on the operating system that you use. In my case the file jdk-7u5-linux-i586.tar.gz.
The documentation requirement is detailed as google jdk 1.6 and if you look we are installing 1.7. It should not be a problem.
After downloading the file, install it; in windows you just have to run the downloaded file and follow the installation steps. In Ubuntu is the steps:
Unzip the file:
tar xvf jdk-7u5-linux-i586.tar.gz
Now we will have a folder named jdk1.7.0_05, and we will move changing the name so that it passes to occupy the location / usr/lib/jvm/jdk1.7.0
sudo mv jdk1.7.0_05 / / usr/lib/jvm/jdk1.7.0
Finally we just need to register the java and javac alternatives for the system to recognize the runtime and compiler java
sudo update-alternatives-install “/ usr / bin / java” “java” “/ usr/lib/jvm/jdk1.7.0/bin/java” 1
sudo update-alternatives-install “/ usr / bin / javac” “javac” “/ usr/lib/jvm/jdk1.7.0/bin/javac” 1
Now both in Windows and Linux you just have to check if the JDK is properly installed by opening the terminal in linux or command environment on windows and run the command java-version javac-version. This will return the description and version of java and javac if you are running.
Is the integrated development environment, developed at Java is multiplatform and is used to develop for numerous languages, since its modularity allows you to create plugins for almost anything, in fact, many other development environments are derived from this, as it has EPL license (Eclipse Plugin license). You can download it from eclipse.org,what we need is the classic eclipse, which includes only the components needed to program Java SE applications.
In the google documentation detailing the minimum version is to run 3.6, I downloaded laque is 4.2, so you just need to unzip the file, locate the folder you want and put in place to check if works. I’ve left the eclipse folder in my home folder, and on windows the Program Files folder probably the is right place.
Inside this folder you will find the eclipse executable, you just have to put up and if all goes well, after the upload windowa window will appear like the following:
Here you can select the workspace. By default it provides a folder called workspace contained in the user’s personal folder. You can specify any other route, and if the folder does not exist will be created.
We must understand the workspace as a folder that will contain the projects and eclipse configuration parameters specific to that area, in this way we can have multiple workspaces with parameters or groups of different projects.
If this workspace serves we accept and follow.
We now have the standard environment for running Java program we will lack now the Android SDK and tools. You can see on the next page.