giovedì 8 luglio 2010

Froyo Build - Install JDK 5.0 on Ubuntu 10.04

Intro


Recently I've decided to build the Android system image (Froyo) for my ADP1 from the lastest Android Open Source Project (AOSP).
I try to build it on Ubuntu Linux 10.04 LTS Desktop Edition 32-bit (x86).

If you'll follow the steps in Getting the Source probably you'll find some issues.
The first issue will be in the first step (Setting up your machine), installing the packages for Sun JDK 5.
The command below it gives you an error about JDK 5.

sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

E: Couldn't find package sun.java5.jdk

So, before of this command you have to use the cure to enable JDK5 and below you can find all the instruction.

Install JDK 5.0


These are the steps to solve the problem.
  1. Open the sources.list with GEdit or with your preferred editor

    sudo gedit /etc/apt/sources.list

  2. Enable the package including in the list the Sun JDK 5. Add this line at the end of file.

    deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse

  3. Update you package

    sudo aptitude update

  4. Now you may install it with all the others packages

    sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

    or alone

    sudo apt-get install sun-java5-jdk

That's all. Now you can continue with the Android's document.
Have a nice day.

8 commenti:

Мортий ha detto...

Thank's a lot :)

Dr.Luiji ha detto...

You are welcome!

Dr.Luiji

ரவி ha detto...

so nice of you. been looking for this fix for couple of days.

Dr.Luiji ha detto...

I'm glad this helped you.
Cheers

Dr.Luiji

siva ha detto...

After adding jaunty line in source.list
I've used sudo aptitude update, but i'm getting errors as follows. so that Still i'm not able to install java5.

Err http://ir.archive.ubuntu.com jaunty-updates/main Packages
404 Not Found [IP: 91.189.88.45 80]
Err http://ir.archive.ubuntu.com jaunty-updates/multiverse Packages
404 Not Found [IP: 91.189.88.45 80]

Help me to get out of this issue!!

Dr.Luiji ha detto...

The error is the classic 404 "Page not found". You can check if you have other link to the same site 'http://ir.archive.ubuntu.com/ubuntu' and comment all these.
Probably these links are not still exist.

purple ha detto...

but i still have an error
:(

E: Some index files failed to download, they have been ignored, or old ones used instead.
msc05-12@msc05-12-desktop:~$ sudo apt-get install sun-java5-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package sun-java5-jdk
msc05-12@msc05-12-desktop:~$

Dr.Luiji ha detto...

I've found one other thread about your problem, hope that helps.
https://answers.launchpad.net/ubuntu/+source/sun-java5/+question/90557

At this time the 5 are not supported anymore and I cannot reproduce the error now, sorry.