0
$ sudo aptitude install sun-java6-jdk
[sudo] password for fal:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
No candidate version found for sun-java6-jdk
No candidate version found for sun-java6-jdk
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

This is my /etc/apt/source.list:

deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe
deb http://security.ubuntu.com/ubuntu jaunty-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted universe
deb http://us.archive.ubuntu.com/ubuntu dapper main restricted
deb http://us.archive.ubuntu.com/ubuntu dapper universe multiverse.

Notice multiverse is in there! Why won't Java install!?

3
  • I don't have enough rep on SF to edit your post, but Java is not spelt in all-caps. :-P Oct 13, 2009 at 1:27
  • JAVA vs. Java: why is this always noted with a comment. I agree that it's incorrect but is "JAVA" really that taboo? (not picking on you, Chris, I'm honestly curious as I see this all-the-time :) ) Oct 13, 2009 at 1:40
  • Commenting on commenting on the spelling of java in uppercase: why is this always noted with a comment? I agree it's annoying, but is it really that taboo? (tee hee) Oct 13, 2009 at 4:27

3 Answers 3

5

Change dapper to jaunty in the last two lines, or, ensure that multiverse is enabled for one of the jaunty lines.

2

alternatively you could some other jvm, such as:

sudo aptitude install openjdk-6-jre
0

Why not just go to java.sun.com and download from there. You'll get a binary-wrapped shell script. Copy it to where you want to install it, like /usr/local/ and. (assuming the file name is jdk-sun-1.6.bin)

cd /usr/local/ sh jdk-sun-1.6.bin

It will ask you to accept the license and extract the entire jdk in jdk-sun-1.6 directory. Now, edit you $PATH to /usr/local/jdk-sun-1.6/bin. If you ever want to go to a newer or older version, you can just blow the jdk-sun-1.6 away or install another jdk next to it and change the path.

I prefer to install JDK directly from Sun site as opposed to from apt utility. It is contained in one place and you have full control.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .