1,安装
1.1 安装依赖
需要保证Oracle JRE 8 及以上,或者 OpenJDK 8及以上(如下安装 openjdk):
# add-apt-repository ppa:openjdk-r/ppa
# apt-get update
# apt-get install openjdk-8-jdk
配置default-jre:
# update-java-alternatives -l
java-1.7.0-openjdk-amd641071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
java-1.8.0-openjdk-amd641069 /usr/lib/jvm/java-1.8.0-openjdk-amd64
# update-alternatives --config java
There are 2 choices forthe alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode
1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
* 2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1069 manual mode