I want to check what version of Java is installed on my PC before installing the latest Java update. How can I do this?
Asked
Active
Viewed 8.1k times
5 Answers
18
You can check your version of Java with any of the following methods.
Java Control Panel (Windows)
- Open the Start Menu and select Control Panel.
- From the Control Panel, select Programs -> Java to open the Java Control Panel.
- Select About to view your current version of Java.
Command Line (Windows)
- Press ⊞ Win+R and type cmd to open the Command Prompt.
- Type
java -versionand press Enter
Control Panel (Windows)
Note: This method may give inaccurate results if Java's PATH has not been updated.
- Open the Start Menu and select Control Panel.
- From the Control Panel, select Programs -> Programs and Features.
- Scroll down the list of programs until you find the most recently installed version of Java
Terminal (MacOS)
- In the Finder, search for Terminal and launch Terminal.app
- Type
java -versionand press Enter
Sources
Stevoisiak
- 13,555
- 39
- 101
- 154
-
These methods show different versions even on the same machine. Some say v7.0, some say v1.7... – Mike B Feb 19 '20 at 02:26
-
1@mblakesley: that's not a difference; see https://stackoverflow.com/questions/2411288/java-versioning-and-terminology-1-6-vs-6-0-openjdk-vs-sun especially the second-high-voted answer https://stackoverflow.com/a/2411663/2868801 . For the 'modular' versions j9 up, starting in 2017, they finally dropped the '1.' prefix. – dave_thompson_085 Aug 27 '21 at 02:23
2
The methods below will help you to check the Java version in Linux:
ps -ef|grep -i JAVAjava -versionwhich java
Worthwelle
- 4,538
- 11
- 21
- 32
santosh
- 121
- 2
2
- Open CMD (In Windows click Start then type cmd, Command Prompt or PowerShell) and execute the following commands.
- For multiple java installations:
wmic product where "name like 'Java%'" get name, version - For default java installation:
java -version
Nick Manitaras
- 21
- 3
1
In windows open command prompt using cmd
Then, type the command java -version
Then, click enter. You will see your java version
KFam
- 11
- 1
-
You're correct. However, this answer has been posted already by another user. – Aulis Ronkainen Nov 03 '20 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.
Kris Stern
- 161
- 1
- 4






