R/tools.R

.onLoad= function(libname, pkgname){
  .jpackage(name = pkgname, jars = "*")

  jv <- .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.6) stop("Java >= 6 is needed for this package but not available")
  }

  invisible()
}
davidgohel/ReporteRsjars documentation built on May 14, 2019, 11:17 p.m.