如何彻底删除Java?(错误:无法打开`C:\Program Files\Java\jre6\lib\i386\jvm.cfg')
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1059954/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to completely remove Java? (Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg')
提问by Farinha
I have passed the last couple of hours trying to downgrade Java to 1.6.0_13 in my attempt to get Google Web Toolkit's hosted mode to work on Eclipse.
为了让 Google Web Toolkit 的托管模式在 Eclipse 上运行,我已经尝试将 Java 降级到 1.6.0_13 的最后几个小时。
And it has proven to be a nightmare-ish task!
事实证明,这是一项噩梦般的任务!
In retrospect:
- All references to Java in the Control Panel -> Uninstall a Program tool have been removed
- Those that didn't want to be removed, have been forced to by Microsoft's "Windows Installer Cleanup Utility" - http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
- An annoying folder called "JRE" was still sitting around, so I deleted it
回想起来:
- 控制面板中所有对 Java 的引用 -> 卸载程序工具已被删除
- 那些不想被删除的,已被微软的“Windows Installer 清理实用程序”强制删除 - http://support .microsoft.com/default.aspx?scid=kb;en-us;290301
- 一个名为“JRE”的恼人文件夹仍然存在,所以我删除了它
Now, if I open a command prompt and type java, I still get:
现在,如果我打开命令提示符并键入 java,我仍然会得到:
Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
错误:无法打开`C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
Which means that it's still hidden somewhere...
这意味着它仍然隐藏在某个地方......
What else do I have to do to remove it completely?
我还需要做什么才能完全删除它?
采纳答案by Hyman Leow
I find it surprising that it's so hard to remove. Anyway, to answer your question, I'd look for and delete:
我发现它很难去除令人惊讶。无论如何,要回答您的问题,我会查找并删除:
- c:\windows\system32\java.exe
- c:\windows\system32\javaw.exe
- c:\windows\system32\java.exe
- c:\windows\system32\javaw.exe
Once those are deleted, you should be fine.
一旦这些被删除,你应该没问题。
That said, I seem to be able to run GWT in hosted mode with Java 1.6.0_14 just fine.
也就是说,我似乎能够使用 Java 1.6.0_14 在托管模式下运行 GWT。
回答by Steve B.
It's been a while since I've done java work on windows, but I believe you need to make sure the javahome/jre/bin directory is in the system path. You probably will want to set the JAVA_HOME variable as well.
我已经有一段时间没有在 Windows 上完成 java 工作了,但我相信您需要确保 javahome/jre/bin 目录在系统路径中。您可能还想设置 JAVA_HOME 变量。
回答by Jon
If you want to downgrade Java you just need to set the JVM that Eclipse uses for compilation:
如果要降级 Java,只需设置 Eclipse 用于编译的 JVM:
Window > Preferences > Java > Installed JREs
窗口 > 首选项 > Java > 已安装的 JRE
and then add a new JDK/JRE that you want, in your case Java 5 then check the box next to the JVM/JRE.
然后添加您想要的新 JDK/JRE,在您的情况下是 Java 5,然后选中 JVM/JRE 旁边的框。
回答by Janusz
If you want to use something with Eclipse you need Java for running Eclipse if I'm not totally mistaken
如果你想在 Eclipse 中使用某些东西,如果我没有完全弄错的话,你需要 Java 来运行 Eclipse
回答by Cuga
Make sure you edit your PATH
environment variable to remove any reference to %JAVA_HOME%\bin
.
确保编辑PATH
环境变量以删除对%JAVA_HOME%\bin
.
Beyond that, it looks like Java is completely removed from your machine.
除此之外,看起来 Java 已从您的机器中完全删除。
回答by Tom Hawtin - tackline
VirtualBox (so long as you have sensible amount of RAM) is great for getting back to a nice crispy-clean set-up.
VirtualBox(只要您有合理的 RAM 量)非常适合恢复到漂亮的干净整洁的设置。
回答by Rahul
The error generated when JAVA gets updated after installing update the folder name of jre gets changed with new version added to the jre and at time of installation of any other tool e.g. eclipse in my case which is looking for the same version at time of first install (jdk name is not changed may be only jre is updated and not jdk).
安装更新后 JAVA 更新时生成的错误 jre 的文件夹名称随着新版本添加到 jre 以及安装任何其他工具(例如 eclipse 在我的情况下,它在首次安装时寻找相同版本)而更改(jdk 名称未更改,可能仅更新 jre 而未更新 jdk)。
So i guess this is post install script issue of JAVA update either all reference name should be changed after post install or none.
所以我猜这是 JAVA 更新的安装后脚本问题,要么在安装后更改所有引用名称,要么不更改。