diff --git a/R/selenium.R b/R/selenium.R index 106a335..027c050 100644 --- a/R/selenium.R +++ b/R/selenium.R @@ -142,6 +142,10 @@ java_check <- function() { if (identical(unname(javapath), "")) { stop("PATH to JAVA not found. Please check JAVA is installed.") } + java_version <- suppressWarnings(system2(Sys.which("java"), "-version", stdout = TRUE, stderr = TRUE)) + if (!is.null(attr(java_version, "status"))) { + stop(paste(java_version, collapse = "\n")) + } javapath }