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

Asked by Paul Spain on 2011-11-23

This recipe apparently worked for lucid release
http://happy-coding.com/install-sun-java6-jdk-on-ubuntu-10-04-lucid/

Problem following this recipe under oneiric (Ubuntu 11.10)

Edited /etc/apt/sources.list to uncomment out these two lines:
deb http://archive.canonical.com/ubuntu oneiric partner
deb-src http://archive.canonical.com/ubuntu 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

Language:
English Edit question
Status:
Solved
For:
Ubuntu sun-java6 Edit question
Assignee:
No assignee Edit question
Solved by:
Paul Spain
Solved:
2011-11-23
Last query:
2011-11-23
Last reply:
2011-11-23

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

Can you give the output of:

cat /etc/lsb-release; uname -a

Thanks

Paul Spain (pvspain) said : #2

Thanks actionparsnip. As requested:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
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 http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
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/libnpjp2.so

(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 libnpjp2.so to /usr/lib/chromium-browser/plugins and it will work in Chrome too.