博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java command line error opening registry key 'Software\JavaSoft\Java Runtime Environment' java.dll
阅读量:6999 次
发布时间:2019-06-27

本文共 1167 字,大约阅读时间需要 3 分钟。

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:

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://www.cnblogs.com/alterhu/p/3586171.html

你可能感兴趣的文章