Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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 http://archive.canonical.com/ubuntu natty partner
deb-src http://archive.canonical.com/ubuntu 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.

See:

https://help.ubuntu.com/community/Java

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. (lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/…) –  Kashif May 3 '12 at 13:53
    
You are right, ive just seen help.ubuntu.com/community/Java –  Sirch May 3 '12 at 14:12

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

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse"
sudo apt-get update
sudo apt-get install sun-java6-jdk

as per below article partner archive isn't available anymore:

https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html
share|improve this answer

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.