Error integrating rJava and java web applications

Trying to call R from a Java program and we see the following error:

Please make sure that the JRI native library is in a directory listed in java.library.path.

java.lang.UnsatisfiedLinkError: D:\Apps\Analytics\statistics\R\sdk\library\rJava
\jri\x64\jri.dll: %1 is not a valid Win32 application
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:19)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:274)

      

+3


source to share


1 answer


This and this answer helped me solve the same problem.

I used the new Dependencies tool and found that R.dll and jvm.dll were not found.



So I added R.dll to the path as written in the JRI FAQ

+1


source







All Articles