Skip to content

Instantly share code, notes, and snippets.

@Torenable
Created July 1, 2017 18:41
Show Gist options
  • Save Torenable/34eb79e2d00206b39b27b259d85a16ab to your computer and use it in GitHub Desktop.
Save Torenable/34eb79e2d00206b39b27b259d85a16ab to your computer and use it in GitHub Desktop.
Loading dynamic library for Java in R
# Credit to Paul Klemm's post [Load rJava in RStudio using macOS 10.12](http://paulklemm.com/blog/2017-02-12-fix-onload-failed-rjava-macos/)
dyn.load(paste0(system2('/usr/libexec/java_home', stdout = TRUE), '/jre/lib/server/libjvm.dylib'))
# then load any packages associated to JVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment