Build a JDK environment using CentOS

Source: Internet
Author: User

Build a JDK environment using CentOS

CentOS 7.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.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2. decompress the package

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. execute commands. /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. Inputjava -versionTest

The above words are displayed, indicating that the configuration is successful!

 

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

CentOS6.3 install JDK and environment Configuration

Install JDK 8 on Ubuntu 14.04

Install JDK graph analysis in Ubuntu

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.