通过 apt-get 存储库在 Debian 中安装 Oracle Java 7 似乎不起作用。
apt-get install oracle-java7-installer
样子apt-get
不认识oracle-java7-installer
。
做了一些谷歌后设法得到答案..
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
# Java 7
apt-get install oracle-java7-installer
# For Java 8 command is:
apt-get install oracle-java8-installer