Java - check the installed version Quickly
In this tutorial, we are going to learn about how to check the Java version which is currently installed in your system.
Using the command prompt
To check the java version, open the command prompt or terminal and run the java -version
command. It prints the currently installed java version in your system.
Here is an example:
java -version
Output:
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
This above command will work on mac, linux and windows based operating systems.
If you’re not installed java in your system, then you will seen the following error inside the terminal.
'java' is not recognized as an internal or external command,
operable program or batch file.