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:WINDOWSsystem32java.exe
When I check my PC, I found that there are 2 java.exe:
1. C:Program FilesJavajdk1.6.0_33injava.exe
2. C:WINDOWSsystem32java.exe
May I know what is the difference between system32java.exe
and Program FilesJavajdk1.6.0_33injava.exe
? Why only system32java.exe
is shown when I run for %i in (java.exe) do @echo. %~$PATH:i
?
Do I still need to add C:Program FilesJavajdk1.6.0_33in
to my PATH environment variable?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…