欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

could not find java se runtime environment

程序员文章站 2022-04-20 08:29:02
...
   运行一个小程序提示could not find java se runtime environment,机器上有java环境,并且配置了JAVA_HOME环境变量,经过检查发现他是去注册表中查找java的相关信息。于是将下面信息导入到注册表即可:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit]
"CurrentVersion"="1.8"

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.8]
"JavaHome"="D:\\Program Files\\Java\\jdk"
"MicroVersion"="0"

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.8.0_152]
"JavaHome"="D:\\Program Files\\Java\\jdk"
"MicroVersion"="0"
   JAVA的版本为:1.8.0_152,安装路径为:D:/Program Files/Java/jdk.