Home Download Ubuntu

Installing Java on Ubuntu server 10.10

Make sure to check if you have Java already installed by running:

sudo java -version


On Ubuntu server 10.10 they have moved the program into partner repositories, and disabled it. You need to enable partner repositories in sources.list:

sudo nano /etc/apt/sources.list


remove the comment (the # sign) from the beginning of line on both deb servers, and save the file.

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu maverick partner
deb-src http://archive.canonical.com/ubuntu maverick partner


update repositories list:
sudo apt-get update


install java:
sudo apt-get install sun-java6-bin


Now check again if everything is ok by running:

sudo java -version


You should get something like:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

4 comments:

The dogger said...

legend, this is what i was looking for

Naveed said...

thanx

doctorproctor said...

When I run "sudo apt-get install sun-java6-bin," I get "E: Couldn't find package sun-java6-bin." Is this due to what's mentioned at https://help.ubuntu.com/community/Java -- i.e., that "Oracle (Sun) Java 6 is no longer available to be distributed by Ubuntu, because of license issues"??

I then followed the manual installation of JDK on that page, and when I typed "wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin" I got "Cannot write to `jdk-6u31-linux-i586.bin' (Permission denied)."

Recommendations for what to do next? Thanks...Jim P.

Speedy Gonzales said...

if your current directory is your home directory, it should work fine. otherwise use sudo wget...

Post a Comment