Scans the system for installed Java Development Kits (JDKs).
Implementation based on CMake FindJava.cmake logic, rJava detection,
and standard OS checks.
Note: This function only returns true system installations. Java installations
managed by rJavaEnv (stored in the package cache) are explicitly excluded, even if
JAVA_HOME or PATH currently point to them.
Arguments
- quiet
Logical. If
TRUE, suppresses informational messages.- .use_cache
Logical. If
TRUE, uses memoisation cache for the expensive system scanning part. Theis_defaultflag is always calculated dynamically based on the currentJAVA_HOME. Default:FALSE(bypass cache for safety). Set toTRUEfor performance in loops or repeated calls.
Value
A data frame with columns:
java_home: Character. Path to the Java home directory.version: Character. Major Java version (e.g., "17", "21").is_default: Logical.TRUEif this matches the current system default Java (determined byJAVA_HOMEor PATH). Rows are ordered with the default Java first (if detected), then by version descending. Returns an empty data frame if no Java installations are found.
