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