Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
$ 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!?

share|improve this question
    
I don't have enough rep on SF to edit your post, but Java is not spelt in all-caps. :-P –  Chris Jester-Young Oct 13 '09 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 :) ) –  Michael Haren Oct 13 '09 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) –  chickeninabiscuit Oct 13 '09 at 4:27

3 Answers 3

up vote 5 down vote accepted

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

share|improve this answer

alternatively you could some other jvm, such as:

sudo aptitude install openjdk-6-jre
share|improve this answer

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.

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.