Original URL: http://wxl24life.iteye.com/blog/1966058
The JDK version that has been used on my computer is 1.6, today I decided to update to 1.7, after installing JDK 1.7, the console input Java command Test whether the installation is successful when the error:
Other code
- C:\users\wxl24life>java
- Registry key ' Software\javasoft\java Runtime environment\currentversion '
- Have value ' 1.7 ', but ' 1.6 ' is required.
- Error:could not find Java.dll
- Error:could not find Java SE Runtime environment.
The source of this error is this: When you decide to install JDK 1.7, you did not uninstall the previously installed JDK 1.6, causing the system to contain two versions of the JDK-related components, possibly due to version conflicts that caused the error.
I started to want to keep two versions of the JDK by switching the version of the JDK I wanted to use, even if I changed the registry by a certain setting. So, in order to get rid of the above error, I try to see the values of the entries under [Hkey_local_machine\software\javasoft\java Runtime Environment] in the registry, all of which are discovery issues. Of course also tried to change some of the values, the error is still.
Finally, I had to give up hope of keeping two versions.
---
Here's the solution:
- If you want to use a JDK version of the original 1.6. The simplest way is to modify "CurrentVersion" in [Hkey_local_machine\software\javasoft\java Runtime Environment] to "1.6"
- If you want to update to the new JDK 1.7, you can only remove the JDK 1.7 by completely uninstalling the installation and then reinstalling the JDK . Uninstall method: Control Panel-Uninstall the program, and then uninstall the JDK, the JRE. Make sure that the previous installation directory (such as C:\Program Files\java) has been emptied after uninstallation.
Note: After installing the new JDK, remember to modify the PATH environment variable.
"Go" Windows7 install JDK 7 O'Clock version conflict problem resolution