运行这个脚本:
- #/bin/sh
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java6-installer
root@kangear:/etc/apt# java -versionjava version "1.6.0_41"Java(TM) SE Runtime Environment (build 1.6.0_41-b02)Java HotSpot(TM) Server VM (build 20.14-b01, mixed mode)root@kangear:/etc/apt#
说明:sun-java6-jre,sun-java6-plugin sun-java6-fonts都同样的由的软件包 oracle-java6-installer 提供的虚拟软件包所以安装 oracle-java6-installer就可以了