Update the Java version on CentOS

Source: Internet
Author: User
Tags centos server
Finally, I upgraded the Java version of my CentOS server. Take a note. # Be sure to have installed yuminstall-yjpackage-utils # On the Sun degrees to download the JDKRPM package on Linux # the current version of the jdk-6u6-linux-i586-rpm.bin # If the official website to download, it may need to be uploaded back to the Server through FTP and then installed # change to executable permission chmod + xjdk-6u6-linux-i586-rpm.

Finally, I upgraded the Java version of my CentOS server. Take a note.

# Be sure to have been installed
Yum install-y jpackage-utils

# Download the jdk rpm package on Linux from Sun
# Current version is jdk-6u6-linux-i586-rpm.bin
# If the download is from the official website, it may need to be uploaded back to the Server through FTP and then installed

# Change to executable permission
Chmod + x jdk-6u6-linux-i586-rpm.bin

# Execute
/Jdk-6u1-linux-i586-rpm.bin

# Download the JDK 6 file starting with java-1.6-sun at the following URL
Http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/RPMS/

# The RPM generated before installation
# Install the downloaded file again
Rpm-Uvh jdk-6u6-linux-i586.rpm & rpm-Uvh java-1.6.0-sun-compat-1.6.0.06-1jpp.i586.rpm

# If you need to change the native path, you can use
Rm-f/usr/bin/java

# Select the JVM default version of Java IN THE SYSTEM
# Two should be displayed, and the latest version should be used. So I chose 2.
/Usr/sbin/alternatives -- config java

# Check whether the beta version has been updated.
Java-version

# If the version is not the latest or the old version, you can use
Rm-f/usr/bin/java & ln-s/usr/java/jre1.6.0 _ 10/bin/java/usr/bin/java

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.