CentOS 7.0 Installation jdk-7u79-linux-x64.tar.gz Newbie recommendation

Source: Internet
Author: User

Beginner Linux on the road encountered a variety of pits to share the correct installation of the JDK

1. Prepare the JDK installation package first I downloaded the jdk-7u79-linux-x64.tar.gz.


2. Create a Java folder under/usr/local

Mkdir/usr/local/java


3. Unzip the file in your directory and move it to the Java directory

TAR-ZXVF jdk-7u79-linux-x64.tar.gz MV Jdk1.7.0_79/usr/local/java


4. Go to the ETC directory and locate the profile file for editing.

CD/ETC VI Profile

Press I to enter edit mode to enter the file at the bottom

Export JAVA_HOME=/USR/LIB/JVM/JAVA7 export JRE_HOME=${JAVA_HOME}/JRE export Classpath=.:${java_home}/lib:${jre_hom E}/lib Export Path=${java_home}/bin: $PATH

5. After pressing ESC after entering the end: Enter Wq W save Q Exit can also input wq! Force Save exit


6. In/etc can be

Source Profile

Make a file effective or in another directory

Source/etc/profile


7. Then verify that Java-version appears

Java Version "1.7.0_79"

Java (TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot (TM) 64-bit Server VM (build 24.79-b02, Mixed mode)

The installation succeeds


Note: Problems that you may encounter ... I've met.

    1. Tar decompression times wrong to say that the file decompression error should be the installation package into Linux when the incomplete re-upload a copy on the line

    2. File effective source hint

      -bash:exprot:command not found

      It means there's a place where you have the wrong one. Or you can try it again or you're looking for a configuration, or you could just copy and paste.

    3. Novice in doubt can only upload Linux can not download the answer is Yes

      wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz? authparam=1461844139_04c9bfb7b00a644a89daabdc3dd56c0a

      With wget can download but also need to find the address or in Windows to find the file after downloading more convenient (I think)




This article is from the "Faint blog" blog, please be sure to keep this source http://hong1yuan.blog.51cto.com/2274368/1850638

CentOS 7.0 Installation jdk-7u79-linux-x64.tar.gz Newbie recommendation

Related Article

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.