How to check the version of JDK in Linux?
When you run the command java -version in the Linux terminal, it will display information similar to the following:
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
In this example, the installed OpenJDK version is shown as 1.8.0_292. You can determine the Java JDK version installed on the system based on the information displayed.