“system32 \java.exe”之间有什么区别?和“Program Files\Java\jdk1.6.0_33\bin\java.exe”? [英] What is the difference between "system32\java.exe" and "Program Files\Java\jdk1.6.0_33\bin\java.exe"?

查看:205
本文介绍了“system32 \java.exe”之间有什么区别?和“Program Files\Java\jdk1.6.0_33\bin\java.exe”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚在Windows XP中安装了Java JDK 6u33。即使我没有设置PATH环境变量,我可以在命令提示符下运行 java -version



当我在(java.exe)do @echo中为%i运行此命令时。 %〜$ PATH:我,我得到这个输出:
C:\WINDOWS\system32\java.exe / p>

当我检查我的电脑时,我发现有2个java.exe:
1. C:\程序文件\Java\jdk1.6.0_33\bin\java.exe

2. C:\WINDOWS\system32 \java.exe



我可以知道 system32 \java.exe Program Files\Java\jdk1.6.0_33\bin\java.exe ?为什么在运行 for %〜$ PATH:我



我还需要添加 C:\Program Files\Java \jdk1.6.0_33\bin\ 到我的PATH环境变量?

解决方案

设置 PATH 变量只是让您可以访问 javac 以及jdk bin文件夹中的其他程序和工具。



\windows\system32\

中的 java.exe code>被提供,所以不是每个人都需要设置一个PATH变量来运行一个java程序(从命令行)选择一个版本(最后安装的)如果有多个(公开)安装,则安装了Java虚拟机(JVM)。



有关更多信息,请参阅此链接:



http://mindprod.com/jgloss/javaexe.html#MULTIPLES



引用:


进一步介绍system32中的java.exe只是一个虚拟的。
它在注册表中查找,然后决定使用哪个真正的java.exe。
安装的最后一个JVM是使用的,即使它是旧的。
要切换JVM,您通常必须重新安装所需的。



I have just installed Java JDK 6u33 in Windows XP. Even though I didn't set the PATH environment variable, I am able to run java -version in command prompt.

When I run this command for %i in (java.exe) do @echo. %~$PATH:i, I get this output: C:\WINDOWS\system32\java.exe

When I check my PC, I found that there are 2 java.exe:
1. C:\Program Files\Java\jdk1.6.0_33\bin\java.exe
2. C:\WINDOWS\system32\java.exe

May I know what is the difference between system32\java.exe and Program Files\Java\jdk1.6.0_33\bin\java.exe? Why only system32\java.exe is shown when I run for %i in (java.exe) do @echo. %~$PATH:i?

Do I still need to add C:\Program Files\Java\jdk1.6.0_33\bin\ to my PATH environment variable?

解决方案

Setting the PATHvariable is just so that you can get access to javac and the other programs and tools in the jdk bin folder.

The java.exe in \windows\system32\ is provided so that not everyone needs to set a PATH variable just to run a java program (from the command line) and selects a version (the last one installed it seems) of the installed java virtual machines (JVM) if there are more than one (publicly) installed.

See this link for further info:

http://mindprod.com/jgloss/javaexe.html#MULTIPLES

Quote:

To complicate things further the java.exe in system32 is just a dummy. It looks in the registry and then decides which real java.exe to use. The last JVM installed gets to be the one used, even if it is older. To switch JVM s, you must normally reinstall the one you want.

这篇关于“system32 \java.exe”之间有什么区别?和“Program Files\Java\jdk1.6.0_33\bin\java.exe”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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