Total Pageviews

Saturday, 12 November 2016

如何在DEBIAN/ubuntu系统上,安装ORACLE JAVA8(jdk8)?

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer

from http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
--------

这样的安装方法好过从http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html去下载压缩包的方法,因为在linux vps里是无法直接从oracle.com下载压缩包的,
这样的链接地址-jdk-8u111-linux-i586.tar.gz其实是无效的,必须先点选Accept License Agreement,之后才能获得真正的链接地址。如果采取先下载到本地机子,再上传到服务器的做法,耗时太长。