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