ppa倉庫:https://launchpad.net/~webupd8team/+archive/ubuntu/java
java
經過ppa倉庫安裝:web
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
若是要安裝Oracle Java 8,直接將shell
sudo apt-get install oracle-java7-installer
改成ubuntu
sudo apt-get install oracle-java8-installer
經過source.list安裝vim
sudo vim /etc/apt/sources.list
在裏面添加(針對於Ubuntu 15.10):oracle
deb http://ppa.launchpad.net/webupd8team/java/ubuntu wily main deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu wily main
而後執行:spa
sudo apt-get update sudo apt-get install oracle-java7-installer
命令行:
.net
sudo update-alternatives --config java
窗口:命令行
sudo galternatives