Skip to content

Instantly share code, notes, and snippets.

@eric-czech
Created February 13, 2016 13:21
Show Gist options
  • Save eric-czech/e243996dcbcbb4ef0ef0 to your computer and use it in GitHub Desktop.
Save eric-czech/e243996dcbcbb4ef0ef0 to your computer and use it in GitHub Desktop.
Linking R to Oracle JDK/JRE
# As an administrative user, run the following on command line (paths need to be adjusted to local jre version):
root> export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.7.0_91.jdk/Contents/Home/jre'
root> export LD_LIBRARY_PATH='/Library/Java/JavaVirtualMachines/jdk1.7.0_91.jdk/Contents/Home/jre/lib/server'
root> export PATH=$PATH:$JAVA_HOME/bin
root> R CMD javareconf JAVA_CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
# On the R command line (launched as admin), run the following
R> install.packages('rJava','http://www.rforge.net/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment