1, installation jdk1.8(1) Download oracle-java8 via Apt-get, first of all,Add a PPA source, equivalent to adding a software warehouse
sudo add-apt-repository Ppa:webupd8team/java
sudo apt-get Update
sudo apt-get Install Oracle-java8-installer
Installed by default under/USR/LIB/JVM
# if it is root, you do not need to add sudo or error
The post-installation directory is as follows:
(2)after the installation is complete, set the environment variableinput vim ~/.BASHRC,add at the end of the file
Export Java_home=/usr/lib/jvm/java-8-oracle Export Jre_home=${java_home}/jre Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
#vim使用方式 :
You need to press "I" to switch to insert mode, press "ESC" to exit the insert mode, edit, press ":", and enter Wq, return. Save the environment variable, exit the editor, enter the command to make it valid source ~/.BASHRC , enter env command to see if the settings are successful ( note the corresponding user ) (3) Java-version View the version of Java installed
Installation Complete!!!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
UBUNTU14 environment, download through Apt-get oracle-java8