Getting rJava/JRI to work:
By Pierre-Yves on Monday, March 23 2009, 20:26 - Bioinformatique - Permalink
Because I just spent way too much time to get this working, if you ever try to get the JRI from rJava working and you have the error:
Cannot find JRI native library!
Please make sure that the JRI native library is in a directory listed in java.library.path
What you need to do is:
In you java script print your java.library.path:
System.out.println(System.getProperty("java.library.path"));
Check that the folder /usr/lib64
is in
Then do:
cp /usr/lib64/R/library/rJava/jri/libjri.so /usr/lib64/
It is this file that JRI is looking for and it will solved the problem.
Well now I'm facing:
Creating Rengine (with arguments) R_HOME is not set. Please set all required environment variables before running this program. Unable to start R
and this even if I made export R_HOME=/usr/lib64/R/ before...
How to waste time....
For those that are interested, rJava/JRI enables object binding between R and Java or Java and R, it's probably pretty cool... once you have it working
Comments
Hello,
I think it's better if you use symbolic link rather than copy.It is better for update
I kept encountering the same problem. The issue turns out was a badly spelled Path variable.
Make sure that both the path to jri.dll and the path to R.dll, are included in the PATH variable and that there is no space in between the two values in the PATH variable. As soon as I fixed that - the program ran fine.
I am trying to use jri from eclipse
for the second problem, i set the enviroment variable in
Run... -> environment
and the value was
R_HOME=/opt/local/lib/R
for mac os x. i took that value from the run script in the jri folder