Download oracle-java8 with apt-get in ubuntu14
1. Install jdk1.8(1) download the oracle-java8 through apt-get, first, add the ppa source, equivalent to adding a software Repository
Sudo add-apt-repository ppa: webupd8team/java
Sudo apt-get update
Sudo apt-get install oracle-java8-installer
Installed in/usr/lib/jvm by default
# If it is root, you do not need to add sudo; otherwise, an error is returned.
The directory after installation is as follows:
(2) After the installation is complete, set the environment variable input 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 usage:
You need to press [I] to switch to the insert mode, press [ESC] to exit the insert mode, edit it, press [:], enter wq, and return to the car. Save the environment variable, exit the editor, and enter the command to make it take effect source ~ /. Bashrc, you can enter the env command to check whether the setting is successful (note the corresponding user) (3) java-version to check the java version installed
Installation Complete !!!