错误:注册表键'软件\JavaSoft\Java运行时环境'\CurrentVersion'?(复制)

时间:2022-10-13 17:04:47

This question already has an answer here:

这个问题已经有了答案:

When I run: C:\Users\ashahria\Downloads>java -jar schemaSpy_5.0.0.jar

当我运行:C:\Users\ashahria\下载> java jar schemaSpy_5.0.0.jar

I get the error below. What is wrong? How can I fix it?

我得到下面的错误。是什么错了吗?我怎样才能修好它呢?

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

错误:注册表键'软件\JavaSoft\Java运行时环境'\CurrentVersion'

has value '1.5', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

值为“1.5”,但需要“1.7”。错误:无法找到java。dll错误:找不到Java SE运行时环境。

14 个解决方案

#1


103  

On my Windows 7 machine, it was solved by doing the following:

在我的Windows 7机器上,它的解决方法是:

  1. In the START menu type "regedit" to open the Registry (be careful doing this)
  2. 在“开始”菜单中键入“regedit”以打开注册表(要小心)
  3. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu
  4. 转到左侧注册表资源管理器/树菜单的“HKEY_LOCAL_MACHINE”
  5. Click "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries
  6. 单击“HKEY_LOCAL_MACHINE”注册中心中的“SOFTWARE”
  7. Click "JavaSoft" within the "SOFTWARE" registries
  8. 在“软件”注册中心中单击“JavaSoft”
  9. Click "Java Runtime Environment" within the "JavaSoft" list of registries
  10. 在“JavaSoft”注册中心列表中单击“Java运行时环境”
  11. Highlight "CurrentVersion" (should see it in the main registry key explorer window on the right)
  12. 突出显示“CurrentVersion”(应该在右边的主注册表项资源管理器窗口中看到)
  13. Change version to "1.7"
  14. 改变版本“1.7”

That is all... should work. Short of that, if you've already tried some other guides and/or messed up your registries, the most certain way to deal with the problem is to delete all previous versions of Java (using "Programs and Features" uninstall process) and then re-install just the version you want to work with. I'd suggest the distribution site at: http://java.com (as it usually has the most stable version)

这就是……应该工作。除此之外,如果您已经尝试过一些其他的指南和/或搞砸了您的注册表,那么处理这个问题的最确定的方法就是删除所有以前的Java版本(使用“程序和特性”卸载过程),然后重新安装您想要使用的版本。我建议发布站点:http://java.com(因为它通常有最稳定的版本)

Or look for a specific version you need from Oracle's site: http://www.oracle.com/technetwork/java/javase/downloads/

或者在Oracle的站点上寻找您需要的特定版本:http://www.oracle.com/technetwork/java/javase/downloads/

#2


28  

Go to 'c:/Windows/System32' and delete the java.exe, javaw.exe and javaws.exe there. See at Registry Key '...' has value '1.7', but '1.6' is required. Java 1.7 is Installed and the Registry is Pointing to it

转到“c:/Windows/System32”并删除java。exe,javaw。exe和javaw。exe。见注册表键'…有“1.7”的值,但需要“1.6”。Java 1.7安装了,注册表指向它。

#3


22  

I had various JDK from 1.5 to 1.7 installed on my PC. I had a need to learn JDK1.8 so installed and my earlier versions of Eclipse (depended on earlier versions of JDK) and I got errors launching my Eclipse IDE, on the command line I tried to check the Java Version and got the error below,

我的PC上安装了从1.5到1.7的各种JDK。我需要学习JDK1.8所以我安装了Eclipse的早期版本(依赖于JDK的早期版本)我在启动Eclipse IDE时出错了,在命令行上我试着检查Java版本并得到下面的错误,

C:\>java -version
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.8', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.

Solution:- I removed

解决方案:——我删除

C:\ProgramData\Oracle\Java\javapath;
from the PATH variable and moved %JAVA%\bin to the start of the PATH variable, that solved the problem for me.

#4


8  

set PATH=c:\Program Files\Java\jdk1.6.0_45\bin;%PATH%

设置路径= c:\ Program Files \ Java \ jdk1.6.0_45 \ bin,% %

this will work if you are working on command prompt

如果您正在使用命令提示符,这将会工作

#5


3  

Your java version is 1.5 (you have jdk 1.5). The jar requires java version 1.7 (you should have jdk 1.7). You should download and install the 1.7 jdk from this website:

您的java版本是1.5(您有jdk 1.5)。jar需要java版本1.7(您应该有jdk 1.7)。您应该从本网站下载并安装1.7 jdk:

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

http://www.oracle.com/technetwork/java/javase/downloads/java - se - jdk 7 -下载- 432154. - html

#6


3  

I had Java 1.8 but had to downgrade to Java 1.6 for some reason. When I uninstalled java 1.8 and ran the command "Java -Version" from the command prompt, I got the error -

我有Java 1.8,但出于某种原因不得不降级为Java 1.6。当我卸载java 1.8并在命令提示符下运行命令“java - version”时,我得到了错误。

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

错误:注册表键'软件\JavaSoft\Java运行时环境'\CurrentVersion'

has value '1.6', but '1.8' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment.

的值为“1.6”,但需要“1.8”。错误:无法找到java。dll错误:找不到Java SE运行时环境。

Uninstalling 1.6 and then reinstalling 1.6 fixed the issue for me :-)

卸载1.6,然后重新安装1.6,修复了我的问题:-)

#7


2  

Adjust the sequence of your environment variable %path% to make sure jre 1.7 is the default one.

调整环境变量%path%的顺序,以确保jre 1.7是默认的。

#8


2  

One Good solution is to restart the PC, this will make the right entry in the Registry of the PC. Restarting solves my problem

一个好的解决方案是重新启动PC机,这将使正确的条目在PC机的注册表。重启可以解决我的问题

#9


2  

Just Reinstall JDK 1.7 it will work.

只要重新安装JDK 1.7就可以了。

#10


2  

I tried the steps mentioned by @bcmoney but for me the current version was already set to the latest version. In my it was Java8.

我尝试了@bcmoney提到的步骤,但对我来说,当前版本已经设置为最新版本。我的it是Java8。

I had various versions of java installed (java6, java7 and java8). I got the same error but instead of 1.5 and 1.7 i got 1.7 and 1.8. I uninstalled java6 on my windows 8.1 machine. After which i tried java -version in command prompt and the error did not appear.

我安装了各种版本的java (java6、java7和java8)。我得到了相同的误差,但不是1。5和1。7和1。8。我在windows 8.1上卸载了java6。之后我在命令提示符中尝试了java -version,没有出现错误。

I am not sure whether this is the right answer but it worked for me so i thought it would help the community too.

我不确定这是否是正确的答案,但它对我起了作用,所以我认为它也会对社区有所帮助。

#11


2  

you may follow these steps :

你可以遵循以下步骤:

  • set JAVA_HOME to jdk[without bin folder]
  • 将JAVA_HOME设置为jdk[没有bin文件夹]
  • set PATH as %JAVA_HOME%/bin;
  • 路径设置为% JAVA_HOME % / bin;
  • put java.exe , javaw.exe & javaws.exe to C:\ProgramData\Oracle\Java\javapath [I was having problem here].
  • 把java。exe,javaw。exe & javaw。\编程数据\Oracle\Java\javapath[我这里有问题]。
  • double click on the java.exe
  • 双击java.exe。
  • Also check and edit the registry value for JAVA current version if required.
  • 如果需要,还可以检查并编辑JAVA当前版本的注册表值。

it worked for me :)

它对我起了作用:

#12


2  

I just uninstalled my Java8 update and tried again. It worked ok!

我刚刚卸载了Java8更新并再次尝试。这工作好!

#13


1  

I ran into this issue after updating the Java JDK, but had not yet restarted my command prompt. After restarting the command prompt, everything worked fine. Presumably, because the PATH variable need to be reset after the JDK update.

我在更新Java JDK之后遇到了这个问题,但是还没有重新启动命令提示符。在重新启动命令提示符之后,一切正常。可能是因为路径变量需要在JDK更新之后重置。

#14


1  

Other times you might have installed Java 7 and 8 both or twice, and from Add/remove programs unistall one of them and it should work.

其他时候,您可能同时安装了Java 7和8或两次,从Add/remove程序中安装了其中一个程序,它应该可以工作。

#1


103  

On my Windows 7 machine, it was solved by doing the following:

在我的Windows 7机器上,它的解决方法是:

  1. In the START menu type "regedit" to open the Registry (be careful doing this)
  2. 在“开始”菜单中键入“regedit”以打开注册表(要小心)
  3. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu
  4. 转到左侧注册表资源管理器/树菜单的“HKEY_LOCAL_MACHINE”
  5. Click "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries
  6. 单击“HKEY_LOCAL_MACHINE”注册中心中的“SOFTWARE”
  7. Click "JavaSoft" within the "SOFTWARE" registries
  8. 在“软件”注册中心中单击“JavaSoft”
  9. Click "Java Runtime Environment" within the "JavaSoft" list of registries
  10. 在“JavaSoft”注册中心列表中单击“Java运行时环境”
  11. Highlight "CurrentVersion" (should see it in the main registry key explorer window on the right)
  12. 突出显示“CurrentVersion”(应该在右边的主注册表项资源管理器窗口中看到)
  13. Change version to "1.7"
  14. 改变版本“1.7”

That is all... should work. Short of that, if you've already tried some other guides and/or messed up your registries, the most certain way to deal with the problem is to delete all previous versions of Java (using "Programs and Features" uninstall process) and then re-install just the version you want to work with. I'd suggest the distribution site at: http://java.com (as it usually has the most stable version)

这就是……应该工作。除此之外,如果您已经尝试过一些其他的指南和/或搞砸了您的注册表,那么处理这个问题的最确定的方法就是删除所有以前的Java版本(使用“程序和特性”卸载过程),然后重新安装您想要使用的版本。我建议发布站点:http://java.com(因为它通常有最稳定的版本)

Or look for a specific version you need from Oracle's site: http://www.oracle.com/technetwork/java/javase/downloads/

或者在Oracle的站点上寻找您需要的特定版本:http://www.oracle.com/technetwork/java/javase/downloads/

#2


28  

Go to 'c:/Windows/System32' and delete the java.exe, javaw.exe and javaws.exe there. See at Registry Key '...' has value '1.7', but '1.6' is required. Java 1.7 is Installed and the Registry is Pointing to it

转到“c:/Windows/System32”并删除java。exe,javaw。exe和javaw。exe。见注册表键'…有“1.7”的值,但需要“1.6”。Java 1.7安装了,注册表指向它。

#3


22  

I had various JDK from 1.5 to 1.7 installed on my PC. I had a need to learn JDK1.8 so installed and my earlier versions of Eclipse (depended on earlier versions of JDK) and I got errors launching my Eclipse IDE, on the command line I tried to check the Java Version and got the error below,

我的PC上安装了从1.5到1.7的各种JDK。我需要学习JDK1.8所以我安装了Eclipse的早期版本(依赖于JDK的早期版本)我在启动Eclipse IDE时出错了,在命令行上我试着检查Java版本并得到下面的错误,

C:\>java -version
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.8', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.

Solution:- I removed

解决方案:——我删除

C:\ProgramData\Oracle\Java\javapath;
from the PATH variable and moved %JAVA%\bin to the start of the PATH variable, that solved the problem for me.

#4


8  

set PATH=c:\Program Files\Java\jdk1.6.0_45\bin;%PATH%

设置路径= c:\ Program Files \ Java \ jdk1.6.0_45 \ bin,% %

this will work if you are working on command prompt

如果您正在使用命令提示符,这将会工作

#5


3  

Your java version is 1.5 (you have jdk 1.5). The jar requires java version 1.7 (you should have jdk 1.7). You should download and install the 1.7 jdk from this website:

您的java版本是1.5(您有jdk 1.5)。jar需要java版本1.7(您应该有jdk 1.7)。您应该从本网站下载并安装1.7 jdk:

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

http://www.oracle.com/technetwork/java/javase/downloads/java - se - jdk 7 -下载- 432154. - html

#6


3  

I had Java 1.8 but had to downgrade to Java 1.6 for some reason. When I uninstalled java 1.8 and ran the command "Java -Version" from the command prompt, I got the error -

我有Java 1.8,但出于某种原因不得不降级为Java 1.6。当我卸载java 1.8并在命令提示符下运行命令“java - version”时,我得到了错误。

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

错误:注册表键'软件\JavaSoft\Java运行时环境'\CurrentVersion'

has value '1.6', but '1.8' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment.

的值为“1.6”,但需要“1.8”。错误:无法找到java。dll错误:找不到Java SE运行时环境。

Uninstalling 1.6 and then reinstalling 1.6 fixed the issue for me :-)

卸载1.6,然后重新安装1.6,修复了我的问题:-)

#7


2  

Adjust the sequence of your environment variable %path% to make sure jre 1.7 is the default one.

调整环境变量%path%的顺序,以确保jre 1.7是默认的。

#8


2  

One Good solution is to restart the PC, this will make the right entry in the Registry of the PC. Restarting solves my problem

一个好的解决方案是重新启动PC机,这将使正确的条目在PC机的注册表。重启可以解决我的问题

#9


2  

Just Reinstall JDK 1.7 it will work.

只要重新安装JDK 1.7就可以了。

#10


2  

I tried the steps mentioned by @bcmoney but for me the current version was already set to the latest version. In my it was Java8.

我尝试了@bcmoney提到的步骤,但对我来说,当前版本已经设置为最新版本。我的it是Java8。

I had various versions of java installed (java6, java7 and java8). I got the same error but instead of 1.5 and 1.7 i got 1.7 and 1.8. I uninstalled java6 on my windows 8.1 machine. After which i tried java -version in command prompt and the error did not appear.

我安装了各种版本的java (java6、java7和java8)。我得到了相同的误差,但不是1。5和1。7和1。8。我在windows 8.1上卸载了java6。之后我在命令提示符中尝试了java -version,没有出现错误。

I am not sure whether this is the right answer but it worked for me so i thought it would help the community too.

我不确定这是否是正确的答案,但它对我起了作用,所以我认为它也会对社区有所帮助。

#11


2  

you may follow these steps :

你可以遵循以下步骤:

  • set JAVA_HOME to jdk[without bin folder]
  • 将JAVA_HOME设置为jdk[没有bin文件夹]
  • set PATH as %JAVA_HOME%/bin;
  • 路径设置为% JAVA_HOME % / bin;
  • put java.exe , javaw.exe & javaws.exe to C:\ProgramData\Oracle\Java\javapath [I was having problem here].
  • 把java。exe,javaw。exe & javaw。\编程数据\Oracle\Java\javapath[我这里有问题]。
  • double click on the java.exe
  • 双击java.exe。
  • Also check and edit the registry value for JAVA current version if required.
  • 如果需要,还可以检查并编辑JAVA当前版本的注册表值。

it worked for me :)

它对我起了作用:

#12


2  

I just uninstalled my Java8 update and tried again. It worked ok!

我刚刚卸载了Java8更新并再次尝试。这工作好!

#13


1  

I ran into this issue after updating the Java JDK, but had not yet restarted my command prompt. After restarting the command prompt, everything worked fine. Presumably, because the PATH variable need to be reset after the JDK update.

我在更新Java JDK之后遇到了这个问题,但是还没有重新启动命令提示符。在重新启动命令提示符之后,一切正常。可能是因为路径变量需要在JDK更新之后重置。

#14


1  

Other times you might have installed Java 7 and 8 both or twice, and from Add/remove programs unistall one of them and it should work.

其他时候,您可能同时安装了Java 7和8或两次,从Add/remove程序中安装了其中一个程序,它应该可以工作。