启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

时间:2021-11-28 14:09:36

  启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”,“java was started but returned code=2”。

错误截图:

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

 

输入命令行java -version,显示一下错误。

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

 

 

解决方案:

  以管理员的身份删除C:\Windows\System32目录下的javaw.exe、java.exe的文件 

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”

删除javaw.exe、java.exe文件后,再次输入命令行java -version正常显示JDK版本,可以正常启动eclipse

启动eclipse出现“Error opening registry key 'software\Javasoft\Java Runtime Environment'”