How come java.exe doesn't need a PATH setting?

W

wylbur37

After installing Sun's J2SE SDK on Windows XP Pro,
I discovered that I could run java.exe (e.g., "java -version")
from *any* subdirectory while in Command Prompt even though
I never modified the PATH string.
When I typed SET (to display all environment settings),
there was no variable shown that included the subdirectory
where java.exe resides.

However, when I tried to run javac.exe, it would only run
if I was either sitting on the subdirectory where it resides
or when I modified the PATH string.

So how come javac.exe requires the usual PATH modification,
but java.exe doesn't?
How did the system know where java.exe was?





__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
 
J

John McGrath

How did the system know where java.exe was?

As Ben pointed out, you will find "java.exe" (and several other Java
related executables) in the system32 directory. These locate the Java
installation based on the registry key HKLM\SOFTWARE\JavaSoft.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top