Windows 7-System32文件夹-java.exe [英] Windows 7 - System32 folder - java.exe

查看:239
本文介绍了Windows 7-System32文件夹-java.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里找到了一些类似的问题,但
他们似乎都没有提供实际答案.

I found a few similar questions here on SO but
none of them seems to provide an actual answer.

我有这两个版本.

 Directory of C:\Java\Bit64

01/19/2014  05:40 AM    <DIR>          .
01/19/2014  05:40 AM    <DIR>          ..
10/18/2013  07:53 AM    <DIR>          jdk1.6.0_45
01/19/2014  05:42 AM    <DIR>          jdk1.7.0_51
10/16/2013  03:15 PM    <DIR>          jre1.6.0_45
01/19/2014  05:40 AM    <DIR>          jre1.7.0_51
               0 File(s)              0 bytes
               6 Dir(s)  45,369,233,408 bytes free

C:\Java\Bit64>

我希望我的Java 6版本是默认版本.

I want my Java 6 version to be the default one.

不幸的是,在C:\Windows\System32中我还有其他一些
我不确定我何时以及如何安装java.exe.

Unfortunately in C:\Windows\System32 I have some other
java.exe which I am not sure when and how was installed by me.

C:\Windows\System32>dir jav*
 Volume in drive C is OS
 Volume Serial Number is xxxx-yyyy

 Directory of C:\Windows\System32

01/19/2014  05:40 AM           189,352 java.exe
01/19/2014  05:40 AM           189,352 javaw.exe
01/19/2014  05:40 AM           312,744 javaws.exe
               3 File(s)        731,896 bytes
               0 Dir(s)  45,369,040,896 bytes free

C:\Windows\System32>

不幸的是,我什至无法在System32中重命名java.exe.

Unfortunately I cannot even rename the java.exe in System32.

    C:\Windows\System32>move java.exe  java___exe
    Access is denied.
            0 file(s) moved.

我记得Java中对此有一些选择
控制面板,但我不确定到底是哪个.

I recall there were some options for this in the Java
Control panel but I am not sure which ones exactly.

所以...

(1)如何以正确的方式使Java 6成为默认版本?

(1) How do I make my Java 6 the default one in the right way?

我不确定是否要在
之前放入PATH %java_home%\bin C:\Windows\System32.但是,即使我这样做,它仍然可以使用Java7.

I am not sure I want to put on my PATH %java_home%\bin before
C:\Windows\System32. But even if I do this, it still picks up Java 7.

(2)为什么?!

(3)如果我同时安装两个版本都可以吗?

(3) If I reinstall both versions will it help?

这是最奇怪的事情(我尝试过基于
在此问题下发布的一些评论上).

This is the most weird thing (I tried that based
on a few comments posted under this question).

    C:\>echo %java_home%
    C:\Java\Bit64\jdk1.6.0_45

    C:\>echo %path%
    %java_home%\bin;C:\Python27\Lib\site-packages\PyQt4;.....................

    C:\>java -version
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

    C:\>

好的,我卸载了两个JDK.然后我安装了JDK 7和
JDK 6(没有任何公共JRE).我在7点之后安装了6点.

OK, I uninstalled both JDKs. Then I installed JDK 7 and
JDK 6 (without any public JREs). And I installed 6 after 7.

(4)有谁知道此键当前版本"的含义
哪个程序使用它?我原本希望将其设置为
1.6是我安装JDK 6秒.不过,现在我不
看到任何问题,JDK 6是默认设置,我想是由于%java_home%\bin
%path%上的第一件事.

(4) Does anyone know what this key 'current version' means
and which program uses it? I was expecting it to be set to
1.6 as I installed JDK 6 second. Still, right now I don't
see any issues, JDK 6 is default, I guess due to %java_home%\bin
being the very first thing on the %path%.

推荐答案

a_horse_with_no_name建议解决了我的问题.

What a_horse_with_no_name suggested fixed my problem.

我卸载了两个JDK(6和7),然后又重新安装了两个JDK(
检查安装公共JRE"选项.这确实解决了所有问题.现在该行为是完全可以预测的(我可以通过按自己想要的方式设置Windows PATH来控制它).
另外,我的System32文件夹中没有任何java.exe.

I uninstalled both JDKs (6 and 7), then I reinstalled both of them without
checking the 'install public JRE' option. This really fixed everything. Now the behavior is totally predictable (I can control it with setting my Windows PATH in the way I want).
Also, I don't have any java.exe in my System32 folder.

在此处发布此答案只是为了让其他人可以从中受益.

Posting this answer here just so that others could benefit from it.

这篇关于Windows 7-System32文件夹-java.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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