CentOS 6.4 64-bit installation JDK 6u45

Source: Internet
Author: User

Get ready:

1. Download the historical version of JDK

Address: http://java.sun.com/products/archive/

Download version Jdk-6u45-linux-x64-rpm.bin

Linux x64 65.69 MB Jdk-6u45-linux-x64-rpm.bin

2, uninstall the CentOS default installation of OPENJDK

To view installed versions

[Email protected] ~]# Rpm-qa | grep Java

The installed OPENJDK will be listed and uninstalled according to the listed content

[Email protected] ~]# rpm-e--nodeps java-1.7. 0-openjdk-1.7. 0.9-2.3. 4.1 . el6_3.x86_64
-e--nodeps ava-1.6. 0-openjdk-1.6. 0.0-1.50. 1.11. 5. el6_3.x86_64

Installation:

To the installation package Jdk-6u45-linux-x64-rpm.bin directory to give the file executable permissions to perform the installation, the JDK will be installed by default to the/usr/java/directory

chmod a+x jdk-6u45-linux-x64-rpm.bin
[Email protected] ~]#./jdk-6u45-linux-x64-rpm.bin

To configure environment variables:

Edit the/etc/profile file and add the environment variable at the bottom

VI /etc/profile
Export JAVA_HOME=/USR/JAVA/JDK1. 6 . 0_45export PATH=$/usr/java/jdk1. 6. 0_45/Bin: $PATHexport CLASSPATH=.:$/usr/java/jdk1. 6. 0_45/lib/dt.jar:$/usr/java/jdk1. 6. 0_45/lib/tools.jarexport java_home PATH CLASSPATH

Make the changes effective

[[Email protected] ~] #source/etc/profile

To view the installation version:

[Email protected] ~]# java-"1.6.0_45"1.6. 0_45-   - 20.45-b01, Mixed mode)

CentOS 6.4 64-bit installation JDK 6u45

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.