cant install sun-java6-jdk under oneiric (11.10)

Asked by Paul Spain on 2011-11-23

This recipe apparently worked for lucid release

Problem following this recipe under oneiric (Ubuntu 11.10)

Edited /etc/apt/sources.list to uncomment out these two lines:
deb oneiric partner
deb-src oneiric partner

Then did..
sudo apt-get update (worked ok)
sudo apt-get install sun-java6-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘sun-java6-jdk’ has no installation candidate

Is sun-java6-sdk no longer available beyond lucid?

Thanks, Paul.

Question information

English Edit question
Ubuntu sun-java6 Edit question
No assignee Edit question
Solved by:
Paul Spain
Last query:
Last reply:

Oracle now own java and do not want their Java product packaging. You need to manually install it using the files from

Can you give the output of:

cat /etc/lsb-release; uname -a


Paul Spain (pvspain) said : #2

Thanks actionparsnip. As requested:

Linux coltrane 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011 i686 i686 i386 GNU/Linux

Cheers, Paul.

sudo mkdir /usr/lib/jvm/
cd /usr/lib/jvm/
sudo apt-get -y install unp
sudo wget
sudo unp jdk-7-linux-i586.tar.gz
sudo rm jdk-7-linux-i586.tar.gz
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0_01/bin/java 71

When you run:
sudo update-alternatives --config java

You can set the Oracle Java as your java binary. You can now run:

mkdir ~/.mozilla/plugins
cd ~/.mozilla/plugins
ln -s /usr/lib/jvm/jre1.7.0_01/lib/i386/

(I assume you use crappy Firefox).

Paul Spain (pvspain) said : #4

Ow! No need to be snippy about Firefox... I switched to Chrome about a year ago for the combined search/address bar, but I used Firefox happily for years before that.

Thanks for your feedback. I actually need the Sun 1.6 JDK - its a pre-requisite for RubyMine.
I installed the 1.6.29 bin file from the Oracle download site.
It seems to be working ok.

Thanks again, Paul.

You can symlink the to /usr/lib/chromium-browser/plugins and it will work in Chrome too.