简体   繁体   中英

rJava and java web app integration error

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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM