Install JDK 7 in centos

Source: Internet
Author: User

Install JDK 7 in centos

1 JDK Introduction

JDK (Java Development Kit, Java development kit, and Java development tools) is a program development environment for writing Java applets and applications. JDK includes the complete JRE (Java Runtime Environment, Java Runtime Environment ).


2 installation instructions

Operating System: centos6.4 64-bit

Software: jdk-7u55-linux-x64.rpm

Installation Method: rpm Installation

Software:

Http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm


3. Original Detection System Version

Figure 1: Detect Java version figure 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/5D/wKiom1PI6vuDDR8cAADJAeiep9Q013.jpg "Title =" image 1.png "alt =" wkiom1pi6vuddr8caadjaeiep9q013.jpg "/>


4. Uninstall openjdk

View the openjdk installation package: rpm-Qa | grep Java

Uninstall openjdk:

Rpm-e -- nodeps java-1.6.0-openjdk-1.6.0.0-1.42.1.11.14.el5_10

Rpm-e -- nodeps java-1.7.0-openjdk-devel-1.7.0.45-2.4.3.1.el5_10


5. Install JDK

Rpm-IVH jdk-7u55-linux-x64.rpm


6. Configure Environment Variables

Vim/etc/profile

Add the following content:

Java_home =/usr/Java/jdk1.7.0 _ 55

Jre_home =/usr/Java/jdk1.7.0 _ 55/JRE

Path = $ path: $ java_home/bin: $ jre_home/bin

Classpath = $ classpath: $ java_home/lib/dt. jar: $ jre_home/lib/tools. Jar

Export java_home jre_home path classpath

Make environment variables take effect immediately:

Source/etc/profile


7. test whether the installation is successful.

Java-version

If the following information is output, the installation is successful.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/5D/wKioL1PI7KbiCY3iAAESNa5C3Fo939.jpg "Title =" image 3.png "alt =" wkiol1pi7kbicy3iaaesna5c3fo939.jpg "/>

 


This article is from the "Bing Lincheng" blog, please be sure to keep this source http://308107405.blog.51cto.com/6396647/1440030

Install JDK 7 in centos

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.