Open Command Prompt, Terminal, or PowerShell
Type `java -version`
Press Enter
Check the displayed Java version
To check the compiler version, type `javac -version`
Press Enter
Check the displayed `javac` version
On Windows, you can also open Command Prompt and run `where java`
On macOS or Linux, you can also run `which java`
To see the installed Java home path, run `echo %JAVA_HOME%` on Windows
To see the installed Java home path, run `echo $JAVA_HOME` on macOS or Linux
