CentOS installation Jdk7

Source: Internet
Author: User

1, download the JDK??

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html?

Choose jdk-7u75-linux-x64.rpm?

2. Install the JDK?

New Catalog? Mkdir/usr/java?

Switch to download directory to copy the downloaded files to /usr/java? CP Jdk-7u75-linux-x64.rpm/usr/java?

Switch to/usr/java? Modify Permissions chmod +x jdk-7u75-linux-x64.rpm?

Run RPM-IVH jdk-7u75-linux-x64.rpm

3, environment variable configuration?

Vi/etc/profile

Added at the end:?

#set Java Environment

Export java_home=/usr/java/jdk1.7.0_75

Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Export path= $PATH: $JAVA _home/binexport java_home CLASSPATH PATH?

Save exit : X?

Enable environment variable configuration: source/etc/profile

? Establish a connection:?

Cd/usr/bin

Ln-s-f/usr/java/jdk1.7.0_75/jre/bin/java

Ln-s-f/usr/java/jdk1.7.0_75/bin/javac?

4, testing?

Java-version? Javac?

CentOS installation Jdk7

Related Article

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.