java.exe 32,Windows 7-System32文件夹-java.exe

I found a few similar questions here on SO but

none of them seems to provide an actual answer.

I have these two versions.

Directory of C:\Java\Bit64

01/19/2014 05:40 AM

01/19/2014 05:40 AM

10/18/2013 07:53 AM

01/19/2014 05:42 AM

10/16/2013 03:15 PM

01/19/2014 05:40 AM

0 File(s) 0 bytes

6 Dir(s) 45,369,233,408 bytes free

C:\Java\Bit64>

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

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>

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.

I recall there were some options for this in the Java

Control panel but I am not sure which ones exactly.

So ...

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

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) Why?!

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

EDIT 1:

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:\>

EDIT 2:

OK, I uninstalled both JDKs. Then I installed JDK 7 and

JDK 6 (without any public JREs). And I installed 6 after 7.

(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%.

7mlpG.png

解决方案

What a_horse_with_no_name suggested fixed my problem.

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
%windir%\system32\java.exe 是一个文件路径,用于指示Windows操作系统上的Java可执行文件的位置。在Windows系统中,%windir% 是一个系统变量,它指代Windows安装目录的路径。而system32是Windows操作系统的一个系统文件夹,它是用来存放系统核心文件的文件夹之一。 所以,%windir%\system32\java.exe 指的是Windows操作系统安装目录下的system32文件夹中的java.exe可执行文件。Java.exeJava编程语言的编译器和解释器之一,它可以将Java程序转换为机器能够理解和执行的指令。使用Java.exe,可以运行Java程序、编译Java源代码、调试Java程序等。 使用%windir%\system32\java.exe时,需要注意以下几点: 1. 确保系统中已经正确安装了Java开发环境(JDK),否则java.exe可能无法正常工作。 2. 确保%windir%代表的Windows安装目录路径是正确的,可以通过在命令提示符中输入"echo %windir%"来查看。 3. 确保系统环境变量中包含了%windir%\system32路径,否则无法正确找到java.exe文件。 当我们在命令行中使用%windir%\system32\java.exe时,可以执行以下操作: 1. 运行Java程序:可以使用java命令加上完整的Java程序路径来运行Java应用程序。 2. 编译Java程序:可以使用javac命令加上完整的Java源代码路径来编译Java程序。 3. 调试Java程序:可以使用java命令加上调试参数来运行Java调试器,对Java程序进行调试操作。 总之,%windir%\system32\java.exe是一个用于在Windows操作系统上执行Java程序的可执行文件的路径。它在Java开发和运行过程中发挥着重要的作用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值