When the JDK is updated, running the Java command may prompt similar registry key ' Java Runtime Environment ' has value ' 1.8 ', but ' 1.7 ' is the requaired problem. In solving this problem at the same time, in Baidu know to answer the click to open the link this problem also helped a lot of netizens. Here is a simple analysis of this problem, and give several solutions, hoping to help everyone. Please correct me! The cause of this problem is obviously the file version mismatch caused, when running Java command under CMD, the system will first go to the A.%systemroot%system32 folder to find Java.exe if found to run (this seems to read the registry?) B. And then, based on the configuration of the Java environment variable to find, run. If you have not found these 2 steps, you will be prompted with one of the most common error prompts: xxxx is not an internal or external command, or a program or batch file that can be run. So the problem is a, or B. WORKAROUND: 1, if the other is configured correctly, you can delete the%systemroot%system32 folder under Java.exe, Javaw.exe and Javaws.exe (existing) to solve. 2, find the new version%java_home%/bin under the
Java.exe, Javaw.exe, and Javaws.exe replace the files in the%systemroot%system32 folder to be resolved. (Only replace the Java.exe, in order to not have any other problems suggested to replace it) PS: If the system has multiple versions of the JDK, you can also alternate the JDK version by modifying the registry. Excerpt from: http://blog.csdn.net/aliasp/article/details/43493909
Registry key ' Java Runtime environment ' has value ' 1.8 ', but ' 1.7 ' is requaired