Ubuntu 14.04安装java 8

前端之家收集整理的这篇文章主要介绍了Ubuntu 14.04安装java 8前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1. 切换国内源

备份源

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

将下列源添加到/etc/apt/sources.list文件

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

2. 执行下列脚本安装java8

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer sudo apt-get install oracle-java8-set-default

猜你在找的Ubuntu相关文章