Linux under Java Environment configuration

Source: Internet
Author: User

Prepare before configuration:

1. Linux systems (for example, CentOS)

2. JDK Linux decompression version (jdk-8u51-linux-i586.gz for example)


Configuration steps:


Step One:

Download the JDK version you need, take jdk-8u51-linux-i586.gz for example.

: Http://pan.baidu.com/s/1c3Mwwu Extraction Code: 2GII

Note: other JDK version installation steps in. gz format are the same, and the JDK version is included in the steps to change to the version you need.


Step Two:

Extract the JDK below the/usr/local/java/directory and execute the following command line:

tar-zxvf/usr/local/java/jdk-8u51-linux-x64.gz-c/usr/local/java/

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/87/44/wKiom1fZDcaT6GMDAAAKUdm29OI508.png "style=" float: none; "title=" 222.png "alt=" Wkiom1fzdcat6gmdaaakudm29oi508.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/87/41/wKioL1fZDcfA85KWAABgO5cDJBg581.png "style=" float: none; "title=" 555555.png "alt=" Wkiol1fzdcfa85kwaabgo5cdjbg581.png "/>


Step Three:

Locate the /etc/profile file, open the file, and add the following code to the last side:

Export java_home=/usr/java/jdk1.8.0_51

Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/44/wKiom1fZE73i4qPkAAB2mzihNP0382.png "title=" 777777.png "alt=" Wkiom1fze73i4qpkaab2mzihnp0382.png "/>


Step Four:

after modifying save /etc/profile This file, run this line command:

Source/etc/profile

causes the current modified file to take effect immediately.


Step Five:

to verify that the installation was successful, enter the command:

java-version

The version number that you installed, that is, the environment is configured successfully (is the version that I install before, here the version number should be: jdk1.8.0_51).

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/87/44/wKiom1fZEaWjMjl0AAANT-aXKPw770.png "title=" 999999.png "alt=" Wkiom1fzeawjmjl0aaant-axkpw770.png "/>


This article is from the "11020801" blog, please be sure to keep this source http://11030801.blog.51cto.com/11020801/1852801

Linux under Java Environment configuration

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.