java command line error opening registry key 'Software\JavaSoft\Java Runtime Environment' java.dll
C:\Users\huxxxxchan>java
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
solution:
http://stackoverflow.com/questions/6362037/java-error-opening-registry-key
I had a similar problem. I had installed JDK7 update 1 but couldn't use it (probably because I found a JRE6 that I deleted after installing JDK7). Uninstalling JDK7 was impossible. The solution was to add the JRE registry entries by hand.
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java RuntimeEnvironment]"CurrentVersion"="1.7"[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java RuntimeEnvironment\1.7]"JavaHome"="C:\\Program Files\\Java\\jre7""RuntimeLib"="C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll"[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java RuntimeEnvironment\1.7.0_01]"JavaHome"="C:\\Program Files\\Java\\jre7""RuntimeLib"="C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll"
You'll have to adjust the above to your own directories and version.
Make sure you remove any java.exe, javaw.exe and javaws.exe from your Windows\System32 folder and if you have an x64 system (Win 7 64 bits) also do the same under Windows\SysWOW64.
作者:高级测试开发网
博客地址:https://seniortesting.club
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。