如何从Windows注册表中删除JRE条目? [英] How to remove JRE entries from Windows registry?

查看:89
本文介绍了如何从Windows注册表中删除JRE条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误,我从Windows计算机上删除了Java文件夹.
现在,我在各种插件以及所有插件中都遇到了问题,它要求我下载最新的JRE .当我尝试这样做时,它说 JRE已经存在,您是否要删除旧的JRE并安装新的JRE?我说是,然后出现错误"1723".

By mistake I deleted Java folder from my Windows machine.
Now I'm getting problems in various plugins and all and it is asking me to download latest JRE. When I try to do that, it says JRE is already present, do you want to remove old JRE and install new one? I say yes and then it gives me error "1723".

因此,简而言之 JRE无法卸载.
我重新安装了Java SDK,但是仍然无法正常工作.我再次卸载了Java SDK,并尝试卸载JRE .....,它不起作用.

So in short JRE is not getting uninstalled.
I reinstalled Java SDK, but still things are not working for me. I again uninstalled Java SDK, and tried to uninstall JRE..... it doesn't work.

因此,我看到的唯一方法是从Windows注册表中删除JRE条目.
我尝试使用 JavaRa

So, I see the only way is to remove JRE entries from Windows registry.
I tried to use softwares like JavaRa, Revo Uninstaller, etc... but they did not help me.

请告诉我我应该删除哪些JRE条目以及它们的位置!

Please let me know which JRE entries should I remove and where they are located!

推荐答案

JDK本身不使用Windows注册表来运行.JRE使用系统注册表在某些情况下运行,例如Applet或使用WebStart技术启动的程序.

The JDK itself does not use the windows registry to run. It is the JRE that uses the system registry to run in some situations like an Applet or a program started with the WebStart technolgy.

最后,如果JRE从Windows系统目录(例如C:/winnt/system32/java.exe)运行,它将仅使用注册表.如果用户只是在命令行中的某个随机目录中键入"java",则会发生这种情况,因为系统目录始终位于用户的路径中.在这种情况下,java.exe将通过查看注册表项

Finally, the JRE will only use the registry if it is run from the Windows system directory (ex . C:/winnt/system32/java.exe). This would happen if the user just types "java" on the commandline in some random directory, because the system directory is always in the user's path. In this situation, the java.exe will locate the current Java installation by looking at the registry key

[HKEY_LOCAL_MACHINE \ SOFTWARE \ JavaSoft \ Java Runtime Environment \ CurrentVersion]

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion]

,然后从相应的键中获取JRE的路径

and then get the path of the JRE from the corresponding key

[HKEY_LOCAL_MACHINE \ SOFTWARE \ JavaSoft \ Java Runtime Environment \ 1.5 \ JavaHome]

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.5\JavaHome]

请注意,某些软件(例如Oracle)会在PATH定义的开头自行安装,因此首先会找到它们的Java安装.您可以像

Beware that some software (eg. Oracle) installs themself at the beginning of the PATH definition, so it's their Java installation that will be found first. You can run the absolute path to the java.exe file, as in

"C:\ Program Files \ Java \ jre1.5.0 \ bin \ java.exe" MyClass

"C:\Program Files\Java\jre1.5.0\bin\java.exe" MyClass

它将不使用注册表,并且将保证使用jre1.5.0.因此,对于常规的Java SE程序,可以安全地指定启动JRE的JRE的完整路径.

It will not use the registry, and it will be guaranteed to use jre1.5.0. So for a regular Java SE program, it is safe to specify the complete path to the JRE to launch it.

但是对于基于Applet/Plugin或WebStart的程序,注册表始终用于确定当前的JRE.

But for the Applet/Plugin or WebStart-based programs, the registry is always used to determine the current JRE.

这篇关于如何从Windows注册表中删除JRE条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆