Windows installs JDK1.8, configures environment variables, and then runs java to report an error
Error: Registry key ‘Software\JavaSoft\Java Runtime Environment’\CurrentVersion’
has value ‘1.8’, but ‘1.7’ is required.
Error: could not find java.dll
The online search solution is to change the current version in the registry to 1.7. It’s OK to try it, but it’s not clear whether it will affect other jdk8 dependent applications, so it’s changed back
In fact, this problem is because JDK did not update the old files in the process of installation. It looked for them from the path. There are three files Java, javaw and javaws in C:: (Windows) system32, so this is the Java executed in the CMD, not the Java configured later_ Java in home, so delete or rename these three files to use jdk8