Amazon Athena JDBC Driver Wrapper Supporting the 'metis' Package
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
779B

  1. .onAttach <- function(libname, pkgname) {
  2. if (interactive()) {
  3. jv <- utils::packageVersion("rJava")
  4. if (utils::compareVersion(toString(jv), "0.9.10") < 1) {
  5. o <- getOption("java.parameters", "")
  6. if (!any(grepl("\\-Xrs", o))) {
  7. packageStartupMessage(
  8. "Did not find '-Xrs' in java.parameters option. Until rJava is updated, ",
  9. "please set this up in your/an Rprofile or at the start of scripts. ",
  10. "See the 'IMPORTANT' section under ?`metis.jars-package`."
  11. )
  12. }
  13. }
  14. }
  15. }
  16. .onLoad <- function(libname, pkgname) {
  17. rJava::.jpackage(pkgname, jars = "*", lib.loc = libname)
  18. rJava::.jpackage(pkgname, lib.loc = libname)
  19. rJava::.jaddClassPath(dir(file.path(getwd(), "inst/java"), full.names = TRUE))
  20. }