ubuntu 环境下 安装 java6-sdk
Pin Young Lv9

安装sun-java6

添加partner源

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

(注: 如果系统提示没有add-apt-repository命令,则需要先安装python-software-properties,命令sudo apt-get install python-software-properties。另外,有些版本的ubuntu即使安装了python-software-properties 也无add-apt-repository命令,此时需要手动添加此行”deb http://archive.canonical.com/ubuntu maverick partner”到/etc/apt/sources.list文件中。)

更新系统

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

安装jre

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

安装jdk

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

查看版本信息

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

设为默认Java

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

选择即可