1.添加一条新源
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
2.执行下列指令
sudo apt-get update
sudo apt-get install sun-java6-jdk