2014年12月4日 星期四

install JDK8 on linux

from:


To add the WebUpd8 Oracle Java PPA repository and install Oracle Java 8 in Debian, use the following commands:

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty 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
exit
java -version

//accept the Oracle JDK8 license automatically
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

//set the Java environment variables
sudo apt-get install oracle-java8-set-default
另一方法為安裝openjdk的套件

How to download and install prebuilt OpenJDK packages

[debian]Debian底下安裝JAVA

沒有留言:

張貼留言