Check Java version

  1. Check Installed JDK Version in Windows
  2. Check Installed JDK Version in Linux/Ubuntu

Java is a programming language that is used to create software applications. To check the installed Java version in your local system, you can use some commands that display results to the console. We will check the version in both Linux and Windows. Let’s understand with examples.

Check Installed JDK Version in Windows

To check the installed Java version in Windows, use the below command to the command prompt.

javac -version

Output:

Check Installed JDK Version in Windows

And to check the JRE(Java Runtime Environment) version in Windows, use the below command.

java -version

check installed jre version in windows

Check Installed JDK Version in Linux/Ubuntu

$ javac -version

Output:

javac 11.0.13

And the screenshot is:

Check Installed JDK Version in Linux/Ubuntu

And to check the JRE(Java Runtime Environment) version in Windows, use the below command.

$ java -version

Output:

openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

check installed jre version in linux

The JDK version’s output depends on the JDK version installed in your local system. But the commands are the same for both Ubuntu and Windows.

Write for us
DelftStack articles are written by software geeks like you. If you also would like to contribute to DelftStack by writing paid articles, you can check the write for us page.

Related Article - Java Version

  • Check if Java Is Installed
  • Check Java Version in Linux
  • Change Java Version in MacOS