How to Check Your Java Version

On Unix-like systems (MacOS, Linux)

  1. Open a Terminal:

    • Linux: Usually Ctrl+Alt+T, or find "Terminal" in your applications menu
    • macOS: Open "Terminal" (find it via Spotlight search or in Applications > Utilities)
  2. Run the command:

    • In the terminal window, type the following command and press Enter:
      java -version
      

Interpreting the Output

After running the command, you'll see output similar to the examples below. The exact details will vary based on your Java installation.

Java 21 example output

Picked up JAVA_TOOL_OPTIONS: -Dkotlinx.coroutines.debug
openjdk 21.0.9 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-21.0.9+10 (build 21.0.9+10-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.9+10 (build 21.0.9+10-LTS, mixed mode, sharing)

Note: Thorg requires Java Version 21+

Other version examples

Java 11 example output

Java 11 example

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)
Java 8 example output

Java 8 example

java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

On Windows

  1. Open Command Prompt or PowerShell:

    • Search for "cmd" or "PowerShell" in the Windows search bar and open the application
  2. Run the command:

    • In the terminal window, type the following command and press Enter:
      java -version
      

Interpreting the Output

After running the command, you'll see output similar to the examples below. The exact details will vary based on your Java installation.

Java 21 example output

Picked up JAVA_TOOL_OPTIONS: -Dkotlinx.coroutines.debug
openjdk 21.0.9 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-21.0.9+10 (build 21.0.9+10-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.9+10 (build 21.0.9+10-LTS, mixed mode, sharing)

Note: Thorg requires Java Version 21+

Other version examples

Java 11 example output

Java 11 example

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)
Java 8 example output

Java 8 example

java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)


Children
  1. How to check Java Version On Windows
  2. How to check Java version on Unix Like OS (Linux, MacOS)
  3. Interpret Output

Backlinks