A small Method for upgrading JAVA in Linux

Source: Internet
Author: User
A small Method for upgrading JAVA in Linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. I encountered some problems at work today, that is, when I upgraded the JAVA versions of Red Hat WS 2.1 and Solaris 8 (the original version is 1.3.1, and version 1.6 is used for work ), the new version is not successfully installed. When you enter java-version, the obtained version will always be 1.3.1. Use the whereis java command to find the path containing JAVA. After deleting them, check whether the version is 1.3.1. At that time, I was depressed. I asked my colleagues "Stone" and "potato" to solve this problem. Later, I came up with another method:

Using which java, we can see that the Java environment variable points to/opt/IBMJava2-131/bin/java (with Red Hat WS 2.1) as an example, and the problem is found. Then we performed the following operations:

1. First install the new version of java, "jre-6u3-linux.bin ";

2. Enter the following command "ln-s/usr/java/jre1.6.0 _ 03/bin/java/opt/IBMJava2-131/bin/java ";

3, then will report an error, said/opt/IBMJava2-131/bi/java already exists;

4. delete/opt/IBMJava2-131/bi/java and execute Step 2 again;

5. Enter java-version and check that the version number is 1.6.

This method may not be used in all systems, but you can try it when encountering these problems.
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.