Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've found debian package on http://packages.ubuntu.com/hardy/devel/sun-java5-jdk It depends on sun-java5-jre. So I'm going to http://packages.ubuntu.com/hardy/sun-java5-jre to install it first. But it depends on sun-java5-jdk!! How is it possible to install???

share|improve this question

2 Answers 2

Hi just download all 4 hardy packages (from the same location you have posted [i can't post more than 2 urls, sorry]) into one directory.

  • sun-java5-bin_1.5.0-15-0ubuntu1_amd64.deb
  • sun-java5-demo_1.5.0-15-0ubuntu1_amd64.deb
  • sun-java5-jdk_1.5.0-15-0ubuntu1_amd64.deb
  • sun-java5-jre_1.5.0-15-0ubuntu1_all.deb

And then run the command

sudo dpkg -i sun-java5*.deb

And after this has finished (i think it will complain about unixodbc and some things) run

sudo apt-get -f install

Then you should have a running java 1.5.

Cheers

share|improve this answer

I also needed to install java5 (in order to compile froyo on a 32 bits system) on ubuntu 11.04 and this did the trick in my case:

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse"
sudo apt-get update
sudo apt-get install sun-java5-jdk

It took a while, some unrelated warnings were fired, but at the end it was installed. After the installation was finished I just did:

sudo update-alternatives --config java

and switched to java5, which was one of the alternatives.

You should be able to go back to java 6 after that just by issuing an uptade-alternatives call.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.