Download oracle-java8 with apt-get in ubuntu14

Source: Internet
Author: User

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 !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.