Installing sun-java6 in Ubuntu Maverick Meerkat

Ubuntu 10.10 Maverick Meerkat comes with open-java6. Sometimes you will also need Oracle Java which is now available in Ubuntu partner repositories. This can be done in few simple steps:

  • open Ubuntu Software Center
  • select Edit | Software Sources
  • select Other Software tab
  • select Canonical Partners and click on Close

If there is no Canonical Partners to select, then you might upgraded from Lucid to Maverick and this line got lost from the source.list. Make sure that you have these two lines in the /etc/apt/sources.list:

deb http://archive.canonical.com/ubuntu maverick partner
deb-src http://archive.canonical.com/ubuntu maverick partner

Now, you need to install java.

$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

If you only need the run-time environment, then you can use sun-java6-jre instead. There, you are all set now. You will probably want to export your JDK_HOME first.
Like this:

$ export JDK_HOME=/usr/lib/jvm/java-6-sun




Leave a comment