Installing the JDK in a Linux environment

Source: Internet
Author: User
Tags save file

1) su root

2) Mkdir/usr/java

3) chmod 777/usr/java

4) Cd/usr/java

5) tar-xvzf jdk-7u75-linux-x64.tar.gz

6) MV jdk1.7.0_75/usr/jdk1.7

7) cd/usr/jdk1.7

[Email protected] jdk1.7]# ls-l

Total 8

Drwxr-xr-x 8 UUCP 143 4096 Dec 17:04 jdk1.7.0_75

8) vi/etc/profile

JAVA_HOME=/USR/JDK1.7
classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $CLASSPATH
path= $JAVA _home/bin: $PATH
export Java_home CLASSPATH PATH

: w save file But do not exit VI
: W file saves the modification to file and does not exit VI
: w! force save, not eject VI
: Wq Save file and exit VI
: wq! force the file to be saved and exit VI
Q: Do not save file, exit VI
: q! do not save file, Force quit VI
: e! Discard all changes and edit from the last time the file was saved


9) source/etc/profile

echo $JAVA _home

Restart JDK installation takes effect


Installing the JDK in a Linux environment

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.