How to Check Your Java Version on Windows 11

Windows 11 logo
Microsoft

Run the “Java -Version” command in a terminal window to check the Java version your PC is using. You can also open the About Java window from the Start menu, but it may show a different Java version that is not currently in use if you have Java versions installed.

Occasionally, programs recommend or require a specific version of Java in order to function. The problem gets worse if you have multiple versions of Java installed. How do you know which version you’re using? Luckily, one command is all you need.

There are many ways to tell which version of Java you have installed, whether you’re using Windows 11 or Windows 10. For example, you can usually type “About Java” in the Start menu search and click the result to get a Java version of the run. However, this does not always reflect the version your system is actually trying to run when running a JAR file.

The discrepancy occurs because multiple versions of Java are installed at the same time. That’s not usually a problem – you just need to be aware of which version you’re actually using.

TIED TOGETHER:

The terminal is the best way to determine what version of Java your PC is using. It doesn’t matter if you use Command Prompt or PowerShell. Press Windows + X to open the Power User menu, then tap “i” to open Terminal. Alternatively, you can click the Start button and type “terminal” into the search bar.

Click Windows+X to open the power user menu, then tap I to open the Windows terminal.

Enter java -version

 "Java version."

Your Java version is displayed in the terminal just below your command. In the screenshot above, Java version 17.0.4.1 is installed on our example PC.

TIED TOGETHER: The New Windows Terminal Is Ready; Here’s why it’s amazing

If you need to change which version of Java your system is using, you need to edit your system’s environment variables, specifically the path. You can use this with the regular Windows graphics UI or CMD (or PowerShell) to change the environment variables.

If you code, you can make your life a lot easier by using an integrated development environment (IDE) like Eclipse or IntelliJ IDEA that allows you to switch between Java versions as you work.

Keep in mind that multiple versions of Java at the same time is not a big problem. It’s actually pretty common. You just need to be sure which version you are actually using.

Leave a Reply

Your email address will not be published. Required fields are marked *