Configuring the JDK environment on Linux systems

Source: Internet
Author: User

1. Download JDK http://www.oracle.com/technetwork/cn/java/javase/downloads/index.html on the website if it is a 64-bit operating system, you can download 64-bit or 32-bit JDK, However, a 32-bit system cannot run a 64-bit JDK.

2, decompression jdk-x.x.x.tar.gz, put the installation package in the file directory you want to put, use the command TAR-ZXVF jdk-x.x.x.tar.gz.

3. Add the JDK to the operating system environment and use the command sudo vim/ect/profile to add a field after the file. Modify Exit.

Export JAVA_HOME=/USR/JAVA/JDK1. 8 . 0_151export CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarexport PATH= $JAVA _home/ Bin: $PATH

4. Use the command Source/ect/profile to run the file. (Source function: Causes the current shell to read into a shell file with a path of FilePath and executes all the statements in the file, usually to re-execute the newly modified initialization file for immediate effect without having to log off and log back in)

5. Use Java-version to test whether the configuration is successful. If the JDK version information is output, the configuration is successful.

Configuring the JDK environment on Linux systems

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.