After installing the Linux system, the system has its own JDK version, because some of the software in the system needs to use this environment. But when we install Eclipse and Tomcat, it's not possible to use this JDK. At this point we need to install our own downloaded JDK, but before that we need to uninstall the JDK that comes with the system.
First look at the Java version of the system:java-version; then use:rpm-qa | grep java command to see the specific information, and finally use:rpm-e--nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 Uninstall.
Find:
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/88/14/wKiom1fo9DryQkfcAAAQ2KsvvHE668.png-wh_500x0-wm_3 -wmp_4-s_386797127.png "title=" 1.png "alt=" Wkiom1fo9dryqkfcaaaq2ksvvhe668.png-wh_50 "/>
Unloading:
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/88/11/wKioL1fo9GmA9uu9AAAiNiBR2gQ611.png-wh_500x0-wm_3 -wmp_4-s_1182863763.png "style=" float:left; "title=" 2.png "alt=" Wkiol1fo9gma9uu9aaainibr2gq611.png-wh_50 "/>
Installation:
Step one: Download jdk-7u55-linux-i586.tar.gz, official: http://www.oracle.com/technetwork/java/javase/downloads/ JAVA-ARCHIVE-DOWNLOADS-JAVASE7-521261.HTML#JDK-7U55-OTH-JPR. After downloading the jdk-7u55-linux-i586.tar.gz file to the local, upload it to the Linux system for decompression and installation.
RZ command:
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/88/14/wKiom1fo9KfCWR3rAAAS5rBwDGE185.png-wh_500x0-wm_3 -wmp_4-s_638618482.png "title=" 3.png "alt=" Wkiom1fo9kfcwr3raaas5rbwdge185.png-wh_50 "/>
Unzip the installation:
#创建文件夹
Mkdir/usr/java
#解压
TAR-ZXVF jdk-7u55-linux-i586.tar.gz-c/usr/java/
Set the environment variable and add the following to the environment variable file:
Vim/etc/profile
#在文件最后添加
Exportjava_home=/usr/java/jdk1.7.0_55
Exportpath= $PATH: $JAVA _home/bin
#刷新配置
Source/etc/profile
Error occurred:
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/88/14/wKiom1fo9NLgXoPQAAAZMx0xSpw832.png-wh_500x0-wm_3 -wmp_4-s_2790445068.png "title=" 4.png "alt=" Wkiom1fo9nlgxopqaaazmx0xspw832.png-wh_50 "/>
Workaround:
Online search, with the sudo yum install glibc.i686 command installed glibc after the problem solved.
This article is from the "12103298" blog, please be sure to keep this source http://dongkevin.blog.51cto.com/12103298/1856731
Remove Linux-brought JDK to install new JDK