R/onload.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname){
  rJava::.jinit()
  jv <- rJava::.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
  if(substr(jv, 1L, 2L) == "1.") {
    jvn <- as.numeric(paste0(strsplit(jv, "[.]")[[1L]][1:2], collapse = "."))
    if(jvn < 1.8) stop("Java >= 8 is needed for staplr but it is not available")
  }
}

Try the staplr package in your browser

Any scripts or data that you put into this service are public.

staplr documentation built on Sept. 18, 2023, 5:16 p.m.