Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed 11.04 in my machine. I have installed JDK6 from the repository. My problem is I need to install JDK5 in my machine I have used the following command but its not working.

~$ sudo apt-get install sun-java5-jdk

It gives the following messages:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sun-java5-jdk

Please help

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

You can manually download it from here: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html and then install it.

share|improve this answer
1  
As a java developer I can confirm that a manual install is the best option for java. Just make sure that you set your paths correctly: export JAVA_HOME=/data/dev/java/java6 - export PATH=$JAVA_HOME/bin:$PATH. Pretty easy to switch between different java versions and JDKs that way. –  jan groth Feb 6 '12 at 12:14
    
Can you also give the instructions for installing it once the .bin file is downloaded. Oracle does not have any instructions. Thanks in advance. –  Jus12 May 23 '12 at 9:56
add comment

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.