How to Check Your Java Version
On Unix-like systems (MacOS, Linux)
From How to check Java version on Unix Like OS (Linux, MacOS)
Go to text →
-
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)
- Linux: Usually
-
Run the command:
- In the terminal window, type the following command and press Enter:
java -version
- In the terminal window, type the following command and press Enter:
From Interpret Output
Go to text →
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
From How to check Java Version On Windows
Go to text →
-
Open Command Prompt or PowerShell:
- Search for "cmd" or "PowerShell" in the Windows search bar and open the application
-
Run the command:
- In the terminal window, type the following command and press Enter:
java -version
- In the terminal window, type the following command and press Enter:
From Interpret Output
Go to text →
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
- How to check Java Version On Windows
- How to check Java version on Unix Like OS (Linux, MacOS)
- Interpret Output
Backlinks