此方法已失效,jdk已经更新到sdk。官方不再做支持,源有错误。请安装jdk1.7!
http://blog.youkuaiyun.com/lxc1014/article/details/18039505
1、添加源:
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse。
方法:
sudo gedit /etc/apt/sources.list
打开源列表,在最后一行添加
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse。保存退出。
2、sudo apt-get update
3、sudo apt-get install sun-java6-jdk
当出现:
The following NEW packages will be installed:
gsfonts-x11 java-common libodbc1 odbcinst odbcinst1debian2 sun-java6-bin
sun-java6-jdk sun-java6-jre unixodbc0 upgraded, 9 newly installed, 0 to remove and 8 not upgraded.
Need to get 40.5 MB of archives.
After this operation, 121 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
然后就会出现下载安装sun-java6-jdk,等待下载安装完成,OK!