18

I want to check what version of Java is installed on my PC before installing the latest Java update. How can I do this?

5 Answers 5

18

You can check your version of Java with any of the following methods.


Java Control Panel (Windows)

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Java to open the Java Control Panel.

Control Panel -> Programs -> Java

  1. Select About to view your current version of Java.

Java version from Java Control Panel


Command Line (Windows)

  1. Press ⊞ Win+R and type cmd to open the Command Prompt.

Opening CMD with Run tool

  1. Type java -version and press Enter

Java version from command line


Control Panel (Windows)

Note: This method may give inaccurate results if Java's PATH has not been updated.

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Programs and Features.
  3. Scroll down the list of programs until you find the most recently installed version of Java

Java version from Windows Control Panel


Terminal (MacOS)

  1. In the Finder, search for Terminal and launch Terminal.app

Searching for Terminal.app in Finder

  1. Type java -version and press Enter

Java version in MacOS terminal


Sources

2
3
  1. Open CMD (In Windows click Start then type cmd, Command Prompt or PowerShell) and execute the following commands.
  2. For multiple java installations: wmic product where "name like 'Java%'" get name, version
  3. For default java installation: java -version
2

The methods below will help you to check the Java version in Linux:

  • ps -ef|grep -i JAVA
  • java -version
  • which java
1

In windows open command prompt using cmd

Then, type the command java -version

Then, click enter. You will see your java version

1
  • You're correct. However, this answer has been posted already by another user. Nov 3, 2020 at 15:30
0

Checking Java version on Windows PowerShell, simply use the command:

java -version

Be careful there is only one dash in the command to be run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .