You can check Java version of by using the command line window.
Type “cmd” in the Search box after clicking on Start.
Alternatively , On Windows 10 operating system, you can ask Cortana to open command.
Say the command “open command prompt” , Cortana would open the command window for you.
To open Command prompt with Administrator privileges:
Type cmd in the search box. Right-click Command 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.
Type java -version at the command line and hit Enter.
You will see the java version in the output as shown below.
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 PATH environment variable is not set on the machine. You can add the “bin” folder of JDK installation to the PATH of environment variable.