Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have Ubuntu 12.04 x64 and I'm trying to install sun jdk for opennms.

 sudo apt-get install sun-java6-jdk

when i run above given command i get following msg:

root@fido:~# 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

I have these lines in my /etc/apt/source.list.

deb natty partner
deb-src natty partner
share|improve this question

2 Answers 2

Its true, the sun-java6-jdk has gone, due to licensing issues its not available from apt.


Describes work arounds.

share|improve this answer
still getting same message. unable to install jdk... I'm using gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5). – Kashif May 3 '12 at 13:19
thread you proivded is bit old one. according to this thread, jdk has been moved...but I'm unable to figure it out. (…) – Kashif May 3 '12 at 13:53
You are right, ive just seen – Sirch May 3 '12 at 14:12

I had to execute following commands and it worked for me.

sudo add-apt-repository "deb hardy multiverse"
sudo add-apt-repository "deb hardy-updates multiverse"
sudo apt-get update
sudo apt-get install sun-java6-jdk

as per below article partner archive isn't available anymore:
share|improve this answer

Your Answer


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.