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

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


If you are using Linux/Unix/Mac OS X:

Try this:

$ which java

Should output the exact location.

After that, you can set JAVA_HOME environment variable yourself.

In my computer (Mac OS X - Snow Leopard):

$ which java/usr/bin/java$ ls -l /usr/bin/javalrwxr-xr-x  1 root  wheel  74 Nov  7 07:59 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

If you are using Windows:

c:\> for %i in (java.exe) do @echo.   %~$PATH:i


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


In Windows at the command prompt

where javac