After installing multiple versions of the JDK java-version does not change the problem solved

Source: Internet
Author: User

1. Questions

For example, after installing the JDK7, then install jdk6,java-version is to display java1.6, even if the Java_home and path modified to Java7 path, Java-version still display 6.

2. Solution

When installing the JDK, the Java.exe is automatically copied to C:windows/system32, and the first path configured in path is System32, so you execute the Java- The Java in version is actually Java in System32, not Java in Java_home.
The workaround is simple, modify the path and put the%java_home%/bin in front of the system32.

C:\documentsand Settings\administrator>pathpath=c:\documentsand Settings\administrator\myeclipseProfessional 2014\binaryCom.sun.java.jdk7.win32.x86_1.7.0.u45\ Bin; C:\ Windows\system32; C:\ Windows; C:\windOWS\system32\wbem; C:\programFiles\commonFiles\thunderNetwork\kankan\codecs; C:\programFiles\thinkpadWireless LAN Adapter Software; C:\bea\tuxedo8.1\ Bin; C:\PROgram Files\TORTOISESVN\ Bin;D:\mongodb\ Bin;D:\redis; F:\resource\maven3/bin; C:\miNGW32\ Bin; C:\programFiles\nodejs\;E:\gradle\gradle-2.4-all\gradle-2.4\ Bin; C:\PROgram Files\stormii\codec; C:\programFiles\stormii; C:\programFiles\IDMComputer Solutions\ultraedit\;C:\documentsand Settings\administrator\applicationData\ nPm
C:\and Settings\Administrator>-version"1.7.0_45"1.7.0_45-b1824.45-b08, mixed mode)

Blog from Ouyida3
2015.6.25

After installing multiple versions of the JDK java-version does not change the problem solved

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.