安装sun-java6
添加partner源
代码语言:javascript复制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文件中。)
更新系统
代码语言:javascript复制sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
安装jre
代码语言:javascript复制sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
安装jdk
代码语言:javascript复制sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
查看版本信息
代码语言:javascript复制sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
设为默认Java
代码语言:javascript复制sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
选择即可