In my efforts to root out the mysterious Java 1.5.0_11 installation I have hiding somewhere on my PC, I completely uninstalled Java.

Now, a search in Explorer turns up nothing, but on the command prompt, if I type "java", it's still there.

If I type java -version it says java version 1.5.0_11.

How do I find it?


Use where java to find out where it is. Or

for %x in (java.exe) do @echo %~$PATH:x

Usually it resides in %ProgramFiles%\Java, though.

  • This is easily the best way to do this on windows I have seen. Jun 14 '12 at 5:46
  • 1
    Wow... thank you... that really did the trick! Plus I learned you can for loops on the command line!
    – cybermotron
    Jun 14 '12 at 6:31
  • Well, that's not really a loop. It's just necessary because you cannot use the %~$VAR:x trick without a for variable (or a numbered argument in a batch file or subroutine).
    – Joey
    Jun 14 '12 at 7:06

If you're under Windows, launch Java, go into Task Manager, right click on the java.exe process, "Open File Location". This should locate it.


Do a file search for java.exe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy