How do I find where JDK is installed on my windows machine?
Quickly find the JDK on Windows using the command prompt:
Inspect the JAVA_HOME environment variable:
Show the path of the java executable:
Typical installation directories:
- For 64-bit JDK:
- For 32-bit JDK on a 64-bit system:
Replace <version>
with your installed JDK version.
Dealing with unconventional installs
What if JAVA_HOME isn't set, or the install path is non-standard? Here are some remedies:
Locate javac
using where
:
This command finds the javac.exe
in the JDK directory & returns its location.
Manually search:
Navigate to C:\Program Files\Java\
or C:\Program Files (x86)\Java\
and look for directories prefixed with 'jdk'.
Check both "Program Files" directories:
On 64-bit systems, JDK can be in Program Files
or Program Files (x86)
, depending on whether you installed the 64-bit or 32-bit JDK.
Check the folder structure:
An established JDK directory has specific subfolders. Confirm it possesses bin
, lib
, and others.
Detailed guide on navigating JDK detection problems
Java Control Panel: Windows offers a GUI-based Java Control Panel for managing Java versions and finding JDK location:
- Find the
Control Panel
->Java
- Under the
Java
tab, manage yourJava
runtime installations.
Deeper with Command Line:
Beyond where
, one can use the cmd for more information:
This command searches your PATH
for java.exe
, outputting its location. Use this navigation guide to find the JDK's hideout.
Remember the difference between JDK and JRE:
Ensure you're viewing the JDK, not the JRE. JDK contains tools like javac
, while JRE does not. Also, setting JAVA_HOME
is crucial for many development tools, even if it's not necessary for running Java applications.
For macOS or Unix-based systems: Not a Windows scenario, but on Unix-based systems like macOS, you can find the installation using symbolic links:
Was this article helpful?