The fastest way to find your Java version
Open Command Prompt and type java -version, then press Enter. The output will show your installed Java version in the first line. If you see an error message instead, Java is either not installed or not set up in your system path — the folder where Windows looks for programs.
The version number appears in a format like "17.0.1" or "11.0.13". The first number (17 or 11) is the major version; the numbers after the dot are the minor version and patch level. Knowing this matters because some websites and software require a specific Java version to run.
Key Takeaways
- Type java -version in Command Prompt to see your installed Java version when ready.
- If you get an error, Java is not installed or your system cannot find it in the standard locations.
- The Java Development Kit (JDK) and Java Runtime Environment (JRE) may have different versions on the same computer.
- You can check the JDK version separately by typing javac -version if you develop software.
Opening Command Prompt on Windows
Press the Windows key and type cmd, then press Enter. A black window will open with a prompt that looks like C:\Users\YourName>. This is Command Prompt, the text-based tool where you type commands instead of clicking buttons.
Alternatively, you can right-click on your desktop or in any folder, look for "Open Command Prompt here" or "Open PowerShell window here" (PowerShell works the same way for this task), and click it. The window will open in that location, though it does not matter where you are for checking Java version.
What the output means
When you type java -version, you will see something like this:
java version "17.0.1" 2021-10-19 LTS Java(TM) SE Runtime Environment (build 17.0.1+12-39) Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)
The first line tells you the version number and whether it is a Long Term Support (LTS) release. LTS versions receive updates for many years; non-LTS versions are supported for only six months. The second line shows it is the Runtime Environment — the part that runs Java programs. The third line is technical detail about the virtual machine that executes the code.
If you see "java is not recognized as an internal or external command", Java is not installed, or Windows cannot find it. This usually means either Java was never installed, or the installation did not add Java to your system path.
Checking the JDK version if you write code
If you develop software in Java, you have the Java Development Kit (JDK) installed in addition to the Runtime Environment. The JDK includes tools for writing and compiling code. To check the JDK version, type javac -version in Command Prompt.
You may see a different version number than java -version showed. This happens when you have multiple Java installations — for example, Java 11 for running programs and Java 17 for writing new code. Both can coexist on the same computer. If javac -version returns an error but java -version works, you have the Runtime Environment but not the Development Kit.
Finding where Java is installed
If you need to know the folder where Java lives on your computer, type where java in Command Prompt. Windows will show you the full path, like C:\Program Files\Java\jdk-17.0.1\bin\java.exe. This path tells you the exact location and version number in the folder name.
On some computers, Java might be installed in C:\Program Files (x86) instead of C:\Program Files, or in a completely different location if you installed it manually. The where command finds it regardless of where it is.
What to do if Java is not found
If Command Prompt says Java is not recognized, you need to install Java or fix your system path. read the Java Runtime Environment from the official Oracle website or use an open-source version like OpenJDK. Run the installer and follow the steps — most installers automatically add Java to your system path.
After installation, close Command Prompt completely and open a new one. Windows needs to restart Command Prompt to recognize the new path. Then type java -version again. If it still does not work, the installer may not have updated your path correctly, and you may need to add it manually through Windows Settings, though this is uncommon with modern installers.
Frequently Asked Questions
Can I have two different Java versions installed at the same time?
Yes. You can install Java 11 and Java 17 on the same computer. The java -version command shows whichever one is first in your system path. If you need to switch between versions regularly, you can change your path settings or use tools like jEnv (on Mac and Linux) to manage multiple installations.
What is the difference between Java 8, Java 11, and Java 17?
These are major version releases. Java 8 was released in 2014, Java 11 in 2018, and Java 17 in 2021. Newer versions have performance improvements and new features, but older software may require an older Java version. Check your software's documentation to see which Java version it needs.
Why does my Command Prompt say "64-Bit" or "32-Bit"?
This describes how Java is built for your computer. 64-bit Java is standard on modern computers and can use more memory. 32-bit Java is older and limited to about 4 GB of memory. Unless your software specifically requires 32-bit Java, you should have 64-bit installed.
Do I need the JDK or just the JRE?
If you only run Java programs, you need the JRE (Runtime Environment). If you write or compile Java code, you need the JDK (Development Kit), which includes the JRE. Most people who are not programmers have only the JRE.