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