sudo apt-get install sun-java5-jdk
執行完會出現unable to locate......錯誤訊息
似乎是1.5版在server被移掉了?
找到解法:
1- Open /etc/apt/sources.list with a text editor like gedit:
sudo gedit /etc/apt/sources.list
2- Add the following lines to the end of the file then save it and close:
## For sun-java5-jdk
deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
3- Update the packages lists and install sun-java5-jdk:
sudo aptitude update
sudo aptitude install sun-java5-jdk
安裝完成之後再使用
update-alternative --config java
update-alternative --config javac
選擇java版本即可

沒有留言:
張貼留言