3

Trying to call R from 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)
Yeldar Kurmangaliyev
  • 33,467
  • 12
  • 59
  • 101
Raja Nagendra Kumar
  • 792
  • 1
  • 6
  • 19

1 Answers1

1

This and this answer helped me to solve same issue.

I used newer tool Dependencies and found that R.dll and jvm.dll was not found.

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

user482745
  • 1,165
  • 1
  • 11
  • 31