The linux server's java environment has been tampered with and repaired.

Source: Internet
Author: User

The linux server's java environment has been tampered with and repaired.

I recently installed ant on the server. To facilitate the direct installation of yum install ant, I suggest installing ant with ant-bin package after pressurization to install many dependent packages, such as java environment, configure the environment in the/etc/profile file. The following describes how to fix java environment tampering:

1. Check the java version and environment currently in use (the local configuration uses java1.7 HotSpot (TM) JVM)


The machine is tampered with as an IBM J9 VM.

2. Check that java, javac, and javaws are in use.

Update-alternatives -- config java

Update-alternatives -- config javac

Update-alternatives -- config javaws


3. Delete the tampered Environment Information: view the information in step 2 and delete it.

Update-alternatives -- remove "java" & quot;/usr/lib/jvm/jre-1.7.0-ibm.x86_64/bin/java & quot"

Update-alternatives -- remove "javac" "/usr /......"

Update-alternatives -- remove "javaws"/usr /...."

4. Run source/etc/profile to enable the linux server to use the java environment configured in/etc/profile.

Java-version


The above results are displayed, indicating that the java environment has been modified successfully.

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.