1. I am on Ubuntu 8.10 which seems to only support Eclipse 3.2 from Synaptic Package Manager. Since I installed both Eclipse and the IcedTea OpenJDK/JRE from Synaptic, I found out later that Android Dev tool actually needed the Sun JDK in order to use its Layout Editor (otherwise you won’t be able to use Android Layout Editor to edit xml files under res/layout folder. The error was java.awt.font wasn’t found something like that.) What I ended up doing was I uninstalled both Eclipse and IcedTea distribution of JDK (openjdk-6-jdk) from Synaptic, otherwise the newly updated Eclipse will continue to use openjdk which prevented me from using Android Layout Editor.
2. Install Sun’s Java (both jre and jdk).
Every step described in the above article worked for me except I couldn’t get the first step work which was:
sudo apt-get install sun-java6-jdk
apt-get said it could not locate sun-java6-jdk something like that.
So I went with this:
sudo aptitude search sun-java
Which told also me it wasn’t able to find sun-java first time I ran it. But after I did
and ->Actions->Update package list
I got to install sun java:
sudo aptitude install sun-java6-jre sun-java6-jdk sun-java6-plugin sun-java6-fonts
I was very happy with aptitude as compared to Synaptic package manager because of the exotic flavor of the former. Besides it seems to be more stable and responsive to me based on my judgement.;)
However, during the adventure, I got confused as to how I could single/full-heartedly accept the license agreement which showed up as a pop up within shell. It turned out I had to maximize the whole thing and scroll down and use TAB key to select “OK” in order to advance.
After all this settled down, I rebooted Ubuntu and made sure that icedTea no longer took over the java world:
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
3. Install and setup Eclipse 3.4.
I manually downloaded Eclipse 3.4 from their site and unzip it into /usr/lib folder. Android dev page recommends Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers, or Eclipse for RCP/Plug-in Developers.
You may want to temporarily change the owner of the/usr/lib folder to yourself instead of root:
chown <user> /usr/lib
After you are done, go to Eclipse->Help->About Eclipse Platform->Configuration Details, you can see Eclipse is now using the Sun jdk/jre:
java.runtime.name=Java(TM) SE Runtime Environment
4. Install Android Development Tool for Eclipse. I personally found/suspected that the http url is faster/more stable(?) than the https one, esp if you are in slow connection. If you are behind some firewall, you may want to set Eclipse’s proxy. Eclispe->Window->Preferences->General->Network Connections->…
5. Configure BASH to export the JAVA_HOME env variable, as well as path to Eclipse like so:
sudo gedit /home/<user>/.bashrc
# ~~~~~~~~~~~~~~~~~ JAVA (JDK,JRE) ~~~~~~~~~~~~~~~~~~~~~
alias eclipse=’java -jar /usr/lib/eclipse/startup.jar’
6. (Optional) Configure Eclipse JRE to the one we just installed from Sun. Eclipse->Window->Preferences->Java->Installed JREs->Add->Standard VM->/usr/lib/jvm/java-6-sun-126.96.36.199. And check this new one we just added.
7. You may want to run
if you had some trouble with it during the process.
8. I guess that’s pretty much about it(?)!
9. Have a great weekend/holiday!