win7 system , Also installed JDK7 and JDK8, Uninstalled JDK8 after ,cmd Command line input :java -version
, It was supposed to show java edition 1.7, The result is wrong :has value '1.7',but '1.8' is required.
I view JAVA_HOME, environment variable , No problem found , Point to C:\Java\jdk1.7.0
resolvent :
Due to the completion of installation JDK7 after , Installed JDK8, Because in the installation JDK1.8 Time , Automatically java.exe,javaw.exe,javaws.exe Three executables copied to C:\Windows\System32 catalog , Because this directory WINDOWS Priority in environment variable is higher than JAVA_HOME Environment variable priority set .
When you understand this , I'll know why , Although uninstalled JDK1.8, but C:\Windows\System32 Under directory
java.exe,javaw.exe,javaws.exe Three executables or JDK1.8 Of , So the JDK1.7 Of JAVA_HOME\bin The following three corresponding executable files are copied and overwritten to the
C:\Windows\System32 Directory , At this time cmd Command line input :java -version , business as usual .
Technology
Daily Recommendation