Rapid installation of JDK under CentOS

Source: Internet
Author: User

The Linux system comes with the JDK (of course, if not, you can ignore this step), but still the old version of 1.4, so you need to uninstall first, and then install 1.6, uninstall the following steps:

[Email protected] ~]# Rpm-qa | grep JDK
[Email protected] ~]# Rpm-qa | grep GCJ
Libgcj-4.1.2-42.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
First, confirm the specific version number of the JDK, and then

[Email protected] ~]# yum-y Remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

1) Unzip the JDK installation package

./Jdk-6u45-linux-x64.bin

If the permissions are insufficient:

chmod777 Jdk-6u45-linux-x64.bin

 

2) Vi/etc/profile last join

Java_home=/home/jdk1.6.0_45path= $JAVA _home/bin: $PATHset classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport Java_homeexport Pathexport CLASSPATH

3) Testing

command line Input java–version, if the current version is displayed, the JDK installation succeeds. (some environments require reboot)

Rapid installation of JDK under 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.