How to check Java version
- Details
- Written by Nam Ha Minh
- Last Updated on 26 August 2019   |   Print Email
This article describes some ways which you can use to check version of Java on your Windows computer. More exactly, the version of Java Runtime Environment (JRE) or Java Development Kit (JDK).
If you have OracleJDK installed on your computer, simply click menu Start, type about java into the search area, then click the About Java icon in the result. You can see the current version of Java in the following dialog:
Or you can go to Control Panel, switch to Large icons view and click the Java logo:
Then in the Java Control Panel dialog, click About button as shown in the following screenshot:
The second way (more familiar with programmers) to check Java version is opening a command prompt and type the following command:
java -version
Suppose that the PATH environment variable is updated for Java, you should see the following result:
Here, the version of Java is 1.8.0, and 201 is the update number. Each version can have several update numbers - the higher the more recent it is.
Note that “Java(TM) SE Runtime Environment” meaning that you’re using Oracle JDK. In case you’re using OpenJDK, the output should be:
If JDK/JRE is not installed or somehow the PATH environment variable is not updated for Java, you can see the following message:
Note that there can be multiple installations of JRE and/or JDK on a computer. In that case, the version of Java you see in the console is of the first JRE/JDK found in the list of environment variables.
To check the version exactly, you need to go to the bin directory of a JDK/JRE installation, for example:
cd C:\Program Files\Java\jdk1.8.0_201\bin
And type the java –version command.
Related Topics:
- Java versions history
- How to set environment variables for Java using command line
- Understand 9 features of Java programming language
- What are JVM, JRE and JDK
- How to write, compile and run a hello world Java program for beginners
- How to get Java Certificates - 5 Steps to Become a Certified Java Programmer
Comments
Since Java 1.5, the version jumps to 5, and so on... so Java 1.8 = Java 8
Ok, newbie question - people talk about Java 8 and Java 11 - if the version is version 1.8.0_201, does that mean it's Java 8? (Seems crazy that they would make it that confusing, but who knows)?