Different Ways To Check Java Version In Windows
Last Updated :
29 Oct, 2020
Java is a programming language that is platform-independent, popular, simple, secure, and statically typed. Before discussing let's clear Java language needs a runtime platform so before going ahead let's clear how java is present on the machine.
Java language comprises three components mainly:
Runtime Concepts than only we will check whether Java is there on the Platform (Operating System + Architecture)
1. Java Virtual Machine
This is a machine-specific software which is responsible for byte code on that machine and converts it into machine-specific instructions.
JVM is different for Windows
JVM is different for Linux
JVM is different for Different Platforms
So as a programmer we don't need to check presence on the machine as it is pre-installed in the machine. It is responsible for running Java code line by line.
2. Java Runtime Environment
It is simply a package that provides an environment to only run our java code on the machine. No development takes place here because of the absence of developmental tools.
3. Java Development Kit
It is also a package that provides an environment to develop and execute where JRE is a part of it along with developmental tools.
- JDK = JRE + Developmental Tools
- JRE = JVM + Library Classes
Now, The first and Foremost step is to check the Java Development Kit in Windows which is also known as JDK. There are lots of versions of Java. Depending upon the operating system methods there are several methods to find the version of Installed JAVA on your Machine:
Let us discuss 3 standard methods in Windows
- User needs to open Command Prompt and enter- 'java -version'
- Open control panel and lookup for Java
- Directories method- Click the Menu 'Start' and typing About.java or readme file
Taking one by one, showcasing in-depth individually
1. Command Prompt
The CMD (Command Interpreter is a command-line Interface. It supports a set of commands and utilities; and has its own programming language for writing batch files. Open CMD and search java -version. First, we have to an environment variable to the installed path location of the java folder. Otherwise, it will show invalid command. It is called 'Terminal' in the case of mac operating systems.
java -version // CMD/Terminal command to check java version on the machine
In the case of Windows OS: It is showing java is installed on the machine with version 1.8.0 (See carefully at line number 5)

"1.8.0_144" is the version of the java
In the case of macOS: It is showing java is installed on the machine with version 14.0.1 ( see carefully at line number 2)

Second Method:
- Open Control Panel and there is an option of the java on the interface of the control panel
- Click on the java option and click about a small pop window will appear
In the case of Windows:

In the case of Mac: Click on the Java icon downside. System preferences in mac are the same as the Control panel in Windows.



Third Method:
Search Program and features in the control panel and search JAVA Named option
In the case of Windows: Simply custom search- About Java

In the case of Mac:
Press the command button followed by a spacebar without lifting fingers from the command button.
A popup box will appear for less than a second followed by another pop-up as shown below:

Similar Reads
Different Ways to Set a Classpath in Java Java Virtual Machine(JVM) uses classpath to locate the class files to execute the code. If your classpath is not set and the class file is not present in the same directory as your java file, then JVM will be unable to find the required class file, and it will throw an error (java.lang.ClassNotFound
3 min read
How to Update the Java Version in Windows? Java is a high-level, robust, object-oriented, and secure programming language that was developed in the year 1995 by Sun Microsystems (which is now part of Oracle group), and James Gosling is known as the father of Java. Â It is a general-purpose programming language intended to let programmers writ
4 min read
How to Install NetBeans Java IDE on Windows? NetBeans IDE is a Free open-Source, Cross-plate form Integrated Development Environment (IDE) with built-in support for the JAVA Programming Language. It can run any machine which consists of the Java Virtual Machine (JVM). It consists of many features for application development as follows: Drag
2 min read
How to Install Java Applet Viewer in Windows? Applet Viewer is a command-line program to run Java applets. It is included in the SDK. It helps you to test an applet before you run it in a browser. An applet is a special type of application that's included as a part of an HTML page and can be stored in a web page and run within a web browser. Th
4 min read
How to Setup Sublime Text 3 for Java in Windows? Java is one of the most popular and widely-used object-oriented programming languages. Java syntax is similar to C/C++. But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects. The Java codes are first comp
2 min read
Environment Variables in Java In Java, Environment variables are widely used by operating systems to deliver configuration data to applications. Environment variables are key/value pairs with both the key and the value being strings, similar to properties in the Java platform. What are Environment Variables in Java?In Java, Envi
5 min read