ubuntu openjdk-8-*安装和版本更新

安装

http://packages.ubuntu.com/utopic/amd64/openjdk-8-jdk/download

If you are running Ubuntu, it is strongly suggested to use a package manager like aptitude or synaptic to download and install packages, instead of doing so manually via this website.

You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list like this:

deb http://cz.archive.ubuntu.com/ubuntu utopic main universe
Replacing cz.archive.ubuntu.com/ubuntu with the mirror in question.

我的操作

sudo vi /etc/apt/sources.list
添加
deb http://kr.archive.ubuntu.com/ubuntu utopic main universe
sudo apt-get update
然后
sudo apt-get install openjdk-8-jdk
修改版本
cd /usr/lib/jvm
sudo rm default-java
sudo ln -s java-8-openjdk-amd64/ default-java
# java -version
openjdk version “1.8.0_40-internal”
OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)
安装并更新版本完成

你可能感兴趣的:(ubuntu)