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
ubuntu15.04安装jdk1.8.0_45和tomcat8:http://www.linuxdiyf.com/linux/12920.html
ubuntu 15.04安装配置JDK1.8:http://www.linuxdiyf.com/linux/12820.html
ubuntu15.04下安装JDK8:http://www.linuxdiyf.com/linux/12321.html
Ubuntu 15.04下apt-get安装JDK:http://www.linuxdiyf.com/linux/11669.html
Linux下安装配置JDK(Ubuntu 15.04):http://www.linuxdiyf.com/linux/11972.html