Tag Archives: but ‘1.7’ is required

JDK 3 Error: has value ‘1.8’, but ‘1.7’ is required [How to Solve]

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