How to check Java version on Windows?
How to check the Java version on Windows?
You can check the Java version by using the command line window.
Command Prompt
Type “cmd” in the Search box after clicking on Start.
Alternatively, On the Windows 10 operating system, you can ask Cortana to open the command.
Say the command “open command prompt” , and Cortana will open the command window for you.
To open the Command prompt with Administrator privileges:
Type cmd in the search box. Right-click Cthe ommand prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
Java -version
Type java -version at the command line and hit Enter.
You will see the java version in the output as shown below.
—–
C:\WINDOWS\system32>java -version
java version “1.8.0_131”
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Java command is normally used to execute a class or a jar file, as shown below:
Usage: java [-options] class [args…]
(to execute a class)
or java [-options] -jar jarfile [args…]
(to execute a jar file)
The common problem is that, if there are any error messages, then the PATH environment variable is not set on the machine. You can add the “bin” folder of JDK installation to the PATH of environment variable.