Check installed Java version using terminal commands
Examples
java_check_version_cmd()
#> JAVA_HOME: /usr/lib/jvm/temurin-11-jdk-amd64
#> Java path: /usr/bin/java
#> Java version: "openjdk version \"11.0.25\" 2024-10-15 OpenJDK Runtime
#> Environment Temurin-11.0.25+9 (build 11.0.25+9) OpenJDK 64-Bit Server VM
#> Temurin-11.0.25+9 (build 11.0.25+9, mixed mode)"
#> [1] "11"