Ubuntu 14.04,15.04等安装配置JDK1.8
1.安装jdk1.8
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer
2.验证java版本
$ java -version java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
3.配置Java环境变量
$ sudo apt-get install oracle-java8-set-default