The tests use the JRIEngine
for running R from Java. This requires some setup as explained here.
JRIEngine
is an implementation using JRI, a Java/R Interface. It uses a native library, which must be findable by Java, and needs the variable environment R_HOME
being properly set.
On OSX:
- Install
rJava
library in R. - Set
R_HOME
to the right path. You can find R home right value, by executing commandR.home()
. - Find the file
libjri.jnilib
inside theR_HOME
path. For R version 3.2, it should be in/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rJava/jri
. - Make a symbolic link of
libjri.jnilib
inside one of the directories listed in the Java System propertyjava.library.path
. To get the value of this property, runSystem.getProperties().getProperty("java.library.path");
in Java. One possibility is inside your personal Library path:$HOME/Library/Java/Extensions
.