Checking your Java version is easy. The steps are the same whether you are on Windows, Mac OS or Linux. You just need to open a terminal window or command prompt and execute a command. Also remember that you might have two types of Java on your computer.
Checking the Java Runtime Environment (JRE)
The Java Runtime Environment lets you run Java programs. More specifically, the java command interprets and executes Java programs. To check the version, open a command window and type java -version. This will display information about your Java Runtime environment. If the command fails, go to the bin directory of the Java Runtime Environment and run java -version again.
Checking the Java Development Kit (JDK)
The Java Development Kit is an environment for Java developers. It includes the Java interpreter and compiler. You use the javac command to compile Java programs. To check the compiler version, type javac -version. Checking the interpreter version is the same as before: java -version.
For more articles, please subscribe, add or follow me here.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.