Install JDK 1.6 in centos 5 (organization)

Source: Internet
Author: User

1. Find the installed JDK
Rpm-Qa | grep JDK

2. Download JDK. Make sure to select
Omitted

3. Installation
Chmod + x jdk-6u31-linux-x64-rpm.bin supervisor change permissions
./Jdk-6u31-linux-x64-rpm.bin plugin installation
Install
/Usr/Java/Default

4. Switch from openjdk to Sun JDK
Alternatives -- install/usr/bin/Java/usr/Java/default/bin/Java 1
Alternatives -- install/usr/bin/javac/usr/Java/default/bin/javac 1

5. Select the desired version.
Alternatives -- config Java

6. view the applied version
Java-version

7. Set environment variables for System Configuration
VI/etc/profile

Add the following lines at the end:
Export java_home =/usr/Java/Default
Export classpath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin

Reboot reboot machine configuration takes effect

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.