Build a JDK environment using Centos

Source: Internet
Author: User

Build a JDK environment using Centos

Centos7.0 & jdk1.8.0 _ 45

1. Upload the downloaded jdk package to the centos operating system through ssh.

Here is jdk-8u45-linux-x64.tar.gz download link: http://www.Z? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> watermark + Cgo8cD4yoaK9 + NDQveLRuTwvcD4KCgoKPHByZSBjbGFzcz0 =" brush: java; ">tar -vxzf jdk-8u45-linux-x64.tar.gz

Obtain the jdk1.8.0 _ 45 folder, as shown in.
3. Edit System Environment Variables

vim /etc/profile

Add the following at the end of the file:

Export JAVA_HOME =/root/jdk1.8.0 _ 45 // you can change the export PATH according to the position of your jdk package. export PATH = $ JAVA_HOME/bin: $ PATH

4. Run the command./etc/profile.
Note: there is a space between. And /.
If the current directory is in/etc/, you can directly execute./profile. Here, there is no space between. And /.
5. Enter java-version for testing.

The above words are displayed, indicating that the configuration 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.