Configure the JDK environment in Linux and the linuxjdk Environment

Source: Internet
Author: User

Configure the JDK environment in Linux and the linuxjdk Environment

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

2. Decompress jdk-x.x.tar.gz, put the installation package in the directory of the file you want to put, and use the command tar-zxvf jdk-x.x.x.tar.gz.

3. Add the jdk to the operating system environment and run the sudo vim/ect/profile command to add a field to the end of the file. Modify and exit.

Export JAVA_HOME =/usr/java/glasis1.8.0 _ 151 export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jarexport PATH = $ JAVA_HOME/bin: $ PATH

4. Run the command source/ect/profile to run the file. (Source function: make the current shell read the shell file whose path is filepath and execute all statements in the file in sequence. It is usually used to re-execute the modified initialization file to make it take effect immediately, instead of logging out and logging on again)

5. Use java-version to test whether the configuration is successful. If jdk information is output, 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.