I have a cmd open (Windows 7), and I type "java.exe", and the system finds the executable at c:\program files\java\jre6\bin.
However, this folder is not in the path. What other mechanism affect the exe lookup?
Starting with Vista and above, Windows now includes a utility called
What's even nicer about
I figured I'd also include an option for XP users that would like the functionality without third party tools. Raymond Chen wrote a command script in A 90-byte "whereis" program. It's a nice one liner that accomplishes the same task!
Save the above script in a .bat or .cmd file and you can launch it from the command line with the filename as the argument. It'll work just like you expect! (note, if using the script version, leave off the extension, it'll search all executable extensions for you)
there's a copy of java.exe in c:\windows\system32 (which is a path defined in the environment variables). that's the one that comes up when you type java.exe at the command prompt, not the one in c:\program files\java\jre6\bin.