Created
October 31, 2016 15:41
-
-
Save tengpeng/4319863d16e296f8b8d2929a92019ddf to your computer and use it in GitHub Desktop.
set up rJava on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To enable rJava support, run the following command: | |
R CMD javareconf JAVA_CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers | |
If you've installed a version of Java other than the default, you might need to instead use: | |
R CMD javareconf JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers -I/Library/Java/JavaVirtualMachines/jdk<version>.jdk/" | |
(where <version> can be found by running `java -version`, `/usr/libexec/java_home`, or `locate jni.h`), or: | |
R CMD javareconf JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers -I$(/usr/libexec/java_home | grep -o '.*jdk')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment