Post updated 2011 Jan 19: Given the opportunity to install 10.10, I have added different instructions for Ubuntu 10.10 (Maverick Meerkat).

Much to my surprise, but probably not those of the Open Source Ruling Class, Sun’s Java 6 has been removed from the Ubuntu Multiverse. Apparently the Ubuntu folks have started putting some weight behind their recommendations for switching to the “OpenJDK.” Fortunately, the official, “proprietary” Java is still available through another Ubuntu repository.

Ubuntu 10.10

To install Sun’s Java 6 JDK on Ubuntu 10.10, add the Sun Java6 Community PPA and install:

add-apt-repository ppa:sun-java-community-team/sun-java6
apt-get update
apt-get install sun-java6-jdk
update-java-alternatives -s java-6-sun

Ubuntu 10.04

To make Sun’s Java 6 JDK available on Ubuntu 10.04 add the new repository like so:

add-apt-repository "deb http://archive.canonical.com/ lucid partner"
aptitude update
aptitude install sun-java6-jdk
update-java-alternatives -s java-6-sun

  5 Responses to “Sun Java 6 on Ubuntu 10.04 10.10 and later”

  1. Sun JDK is available in Ubuntu Software Center.

  2. There are definitely differences between the two. OpenJDK seems susceptible to an NIO bug that causes the CPU to hit 100%. Seems a shame that the Ubuntu guys are hiding the sun vm in the partner repo. Hopefully it means that OpenJDK bugs get more attention. Hopefully it doesn’t mean less visibility of issues installing the SunVM on Ubuntu.

  3. There is no SUN in partner repository for Maverick Meerkat – but one thing does the trick:

    I downloaded all the packages from http://archive.canonical.com/pool/partner/s/sun-java6/

    and installed them with
    ‘dpkg -i *’.
    Because of missing dependencies it could be that it’s finishing leaving the packages unconfiguered, but
    ‘apt-get -f install’
    does the trick.

    If there’s no other JRE on the machine, you’re finished, else you can choose your default JRE with
    ‘update-java-alternatives -s java-6-sun’

    and then you’re good to go ;)

    This hopefully all changes when Sun puts up Java into the partner repositories.

  4. Thank you for posting!
    You saved me a lot of trouble and time!

  5. thanks a lot… its very useful for me…

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

   
© 2011 And now here's something… Suffusion theme by Sayontan Sinha