64-bit jdk 6u45 installation in CentOS 6.4

Source: Internet
Author: User

64-bit jdk 6u45 installation in CentOS 6.4

Preparation:

1. Download the jdk of a previous version.

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

Version jdk-6u45-linux-x64-rpm.bin downloaded

Linux x6465.69 MBjdk-6u45-linux-x64-rpm.bin

2. Uninstall the default openjdk installed on CentOS

View installed versions

[Root @ test1 ~] # Rpm-qa | grepjava

The installed openjdk is listed and uninstalled Based on the listed content.

[root@test1 ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64
[root@test1 ~]# rpm -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 and then execute the installation, jdk will be installed to the/usr/java/directory by default

[root@test1 ~]# chmod a+x jdk-6u45-linux-x64-rpm.bin
[root@test1 ~]# ./jdk-6u45-linux-x64-rpm.bin

Configure environment variables:

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

[root@test1 ~]# 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 modification take effect

[root@test1 ~]#source /etc/profile

View the installation version:

[root@test1 ~]# java -versionjava version "1.6.0_45"Java(TM) SE Runtime Environment (build 1.6.0_45-b06)Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

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.