Preface:
There are two cases:
(1) computer and install the JDK7 JDK8, you need to drop back to version 7 from 8
(2) the computer and install the JDK7 JDK8, unloading 8, 7 used
cmd run java -version, error: has value '1.8', but '1.7' is required.
text:
(1) computer and install the JDK7 JDK8, you need to drop back to version 7 from 8
Solution:
1. Open the Start menu search regedit, open the registry
2. Open the "HKEY_LOCAL_MACHINE"
3. Click on "SOFTWARE"
4. Click "JavaSoft"
5. Click on "the Java Runtime Environment"
6. Select "CurrentVersion", right-click Change, change to "1.7"
(2) the computer and install the JDK7 JDK8, unloading 8, 7 used
Error reason: Because JDK7 After installing, the installation of JDK8, when you install JDK1.8, automatically copies the java.exe, javaw.exe, javaws.exe three executable files to the C: \ Windows \ System32 directory, and this priority WINDOWS directory in the environment variable is higher than the environment variable JAVA_HOME priority.
Solution: The JAVA_HOME JDK1.7 of \ these three corresponding executable file in the bin copy cover to the C: \ Windows \ System32 directory
Reference blog:
After installing the win7 solve jdk7, then install jdk8 emerging issues has value '1.8', but ' 1.7' is required -. Wins strong - blog Park
https://www.cnblogs.com/wincai/p/5542071.html