2010년 9월 17일 금요일

Installing sun-java5-jdk on ubuntu

* The recent master branch releases of Android Open Source Project, you need to install java6. Google finally switched to jdk 6 from old jdk 5.

In order to build Android(open source) on Ubutu, you need to install sun-java5-jdk.
However, sun-java5-jdk is not available on the repositories of latest Ubuntu versions (9.10 or aboves) any longer.

Here is the way to install sun-java5-jdk on the latest versions of Ubuntu.

1- Open /etc/apt/sources.list with a text editor like gedit:

sudo gedit /etc/apt/sources.list

2- Add the following lines to the end of the file then save it and close:

## For sun-java5-jdk
deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse

3- Update the packages lists and install sun-java5-jdk:

sudo aptitude update
sudo aptitude install sun-java5-jdk

4- (Optional) Remove the lines added at the step 2 from the sources.list.

4-1. open an editor to modify sources.list
sudo gedit /etc/apt/sources.list
4-2. remove or comment out(like the below) the added lines
## For sun-java5-jdk
#deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
4-3. Update the package lists
sudo aptitude update

Source: http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/

댓글 없음:

댓글 쓰기