Alex Rivera | Logout

How do I find where JDK is installed on my windows machine?

Asked 2011-01-13T14:26:13.970
427

I need to know where JDK is located on my machine.

On running Java -version in cmd, it shows the version as '1.6.xx'. To find the location of this SDK on my machine I tried using echo %JAVA_HOME% but it is only showing 'JAVA_HOME' (as there is no 'JAVA_PATH' var set in my environment variables).

alternatively, you can search in the windows search , on top left corner with the keyword "jdk" and in the search results you can identify the folder based on the version number [in case you have multiple JDK installed]

Edit
Report

1 Answer

169

Windows > Start > cmd >

C:> for %i in (javac.exe) do @echo.   %~$PATH:i

If you have a JDK installed, the Path is displayed,
for example: C:\Program Files\Java\jdk1.6.0_30\bin\javac.exe

answered 2012-05-09T16:29:37.727

Your Answer