Install JDK1.7 and linuxjdk1.7 in Linux

Source: Internet
Author: User

Install JDK1.7 and linuxjdk1.7 in Linux

LinuxInstallJDK1.7

1. Prepare materials

 

2. Create the/usr/local/java directory and put the JDK Installation File into it.

Mkdir/usr/local/java

 

3. Decompress JDK to the current directory.

Tar-zxvf jdk-7u79-linux-x64.tar.gz

Get the jdk1.7.0 _ 79 folder.

 

4. Edit the configuration file and configure Environment Variables

Vim/etc/profile

Enter I to add jdk configuration information at the bottom of the file

# Java PathJAVA_HOME =/usr/local/java/jdk1.7.0 _ 79 CLASSPATH = $ JAVA_HOME/lib/PATH = $ PATH: $ JAVA_HOME/binexport PATH JAVA_HOME CLASSPATH

For example

 

Press Esc to exit editing, and enter: wq to save and exit.

5. Enter the command to make the configuration take effect immediately

Source/etc/profile

6. Check the installation status.

Java-version

The displayed version indicates that the installation is successful.

 

 

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: info-contact@alibabacloud.com 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.