Install jdk in Linux and jdk in Linux

Source: Internet
Author: User
Tags scp command

Install jdk in Linux and jdk in Linux

1. Delete the built-in jdk in linux (to keep the system clean or not delete it)

The Complete identification system has been deleted.

2. Download JDK and select the appropriate JDK version as needed.

Address: http://www.oracle.com/technetwork/java/javase/downloads/index.html

3. install and configure

I copied the jdk from another machine, so I need to use the scp command to copy the file to the machine to be installed, and then execute the installation.

Edit the profile file and configure Environment Variables

Export JAVA_HOME =/usr/java/jdk1.7.0 _ 67 export PATH = $ JAVA_HOME/bin: $ PATHexport CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tool. jar

4. Verify

Enter java-version in the terminal, and the version information is marked to be correctly installed. Enter javac. The information is displayed normally and the environment variables are correctly configured. If the environment variable does not take effect immediately, run source/etc/profile

 

 

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.