How to Check Java Version in Command Prompt

Are you curious about what version of Java you have installed on your Windows machine? No worries, how to check Java version in command prompt is quick and easy and only requires a single prompt.

In this “how-to” article, we’ll show you step by step how to check the version of Java installed on your Windows machine using the command prompt.

Note on Operating Systems

This article is intended for the Windows command prompt, but the process is similar in other operating systems such as MacOS and Linux. On MacOS, you can use Terminal, and on Linux, you can use a shell or console.

How to Check Java Version in Command Prompt

Here’s how you can check the version of Java installed on your Windows machine using the command prompt:

How to Check Java Version in Command Prompt

Total Time: 1 minute

Open the Command Prompt

Click on the Windows icon in the bottom left-hand corner of your screen, Type “cmd” into the search bar and right-click on “Command Prompt” then select “Run as administrator”

Type the Java -version command

In the command prompt window, type;

java -version

This will display the version of Java that’s currently installed on your computer.

Please note! You must leave a space between java and -version, the correct code can be copied and pasted from below;

java -version

What is Java and why should you care which version you have installed?

Now you know the process of checking your Java version in command prompt, let’s take a quick look at what Java is and why it’s so important.

Java is a popular programming language first released in 1995, it is used to create all sorts of applications, from simple desktop software to complex enterprise-level systems. It’s a class-based, object-oriented language that was designed to be portable across different computer systems, meaning that a program written in Java can run on pretty much any device that has a Java Virtual Machine installed.

It’s important to keep Java up to date for several reasons. First and foremost, outdated versions of Java can contain security vulnerabilities that can be exploited by malicious actors to gain unauthorized access to your computer or steal sensitive information.

By updating Java to the latest version, you ensure that any known security vulnerabilities are fixed, and that you have access to the latest features and performance improvements. This is especially important for businesses and individuals who use Java for critical applications, as a security breach can result in significant financial losses or damage to reputation.

In addition, some software applications may require a specific version of Java to run correctly, and updating to the latest version can ensure compatibility and prevent compatibility issues.

So whether you’re a developer, a sysadmin who cares about security or just someone who wants to check which version of Java you’ve got installed, it’s a good idea to know a little bit about this versatile and widely-used programming language.

Updating Java

If after running the Java -version command you find you have an outdated version of Java and you want to update, you can do so by navigating to the official Java website, where you can download the latest installer.


Checking the version of Java installed on your machine is quick and easy using the command prompt. By following the steps outlined in this article, you can check which version of Java you have installed and ensure that your machine is up to date. Whether you’re a seasoned techie or a newcomer to the world of programming, this information is crucial to have at your fingertips.

Leave a Comment