Preface:
There are two situations:
(1) JDK7 and jdk8 are installed on the computer at the same time. You need to reduce the version from 8 to 7
(2) Jd7 and K8 were installed at the same time
Run Java – version in CMD and report an error: has value ‘1.8’, but ‘1.7’ is required
Text:
(1) JDK7 and jdk8 are installed on the computer at the same time. You need to reduce the version from 8 to 7
Solution:
1. Open the start menu, search regedit, and open the registry
2. Open “HKEY”_LOCAL_MACHINEā
3. Click “software”
4. Click “javasoft”
5. Click “Java runtime environment”
6. Select “CurrentVersion” and right-click to change it to “1.7”
(2) Jd7 and K8 were installed at the same time
Error reason: after installing JDK7, jdk8 is installed. When installing JDK1.8, the three executable files java.exe, javaw.exe and javaws.exe are automatically copied to the C: \ windows \ system32 directory, and this directory has higher priority than Java in the windows environment variable_The priority of the environment variable set by home
Solution: put the Java of jdk1.7_Copy and overwrite the three corresponding executable files under home \ bin to the C: \ windows \ system32 directory
Similar Posts:
- No JVM could be found on your system [How to Solve]
- Chromedriver executable needs to be in path [How to Solve]
- [791] Maven configuration error and the Java_ The solution of home environment variable is not defined correctly
- [Solved] NB: JAVA_HOME should point to a JDK not a JRE
- SDK manager cannot open the solution (Android)
- Eclipse can’t open, prompt could not open jvm.cfg error
- Failed to install node with. MSI, rolling back action (Reprint)
- PHPStorm Run Error: Failed to load JVM DLL
- [Solved] Python import _ SSL DLL load fail error the module problem could not be found
- The CATALINA_HOME environment variable is not defined correctly