I'm trying to determine the location of an executable (java.exe) on Windows. I know it must exist somewhere in the PATH since I can run it, but I don't know the exact directory that it is being run from. On a UNIX system I could use the whence command to obtain this information. Is there an equivalent command for Windows systems?
Then open a command prompt and type:
Check out the first Google hit for "equivalent whence windows". You'll have to write a small utility to do it.
Here's a "whereis" script from Raymond Chen's blog: