Java調用R環境配置問題:Cannot find JRI native library!
阿新 • • 發佈:2018-11-03
properly setup long scrip bsp tar fin lang expec
Cannot find JRI native library!
Please make sure that the JRI native library is in a directory listed in java.library.path.
java.lang.UnsatisfiedLinkError: C:\Users\----\R\win-library\3.5\rJava\jri\x64\jri.dll: Can‘t find dependent libraries
依照官網解釋
Q: | I get the following error, what‘s wrong? java.lang.UnsatisfiedLinkError: no jri in java.library.path |
A: |
Usually it means that you didn‘t setup the necessary environment
variables properly or the JRI library is not where it is expected to be.
The recommended way to start JRI programs is to use the run
script which is generated along with the library. It sets everything up
and is tested to work. If you want to write your own script or launcher,
you must observe at least the following points:
|
1、在環境變量中設置R_HOME;
2、在系統path中加入路徑,指向包含R.dll的目錄,如果你的系統為64位系統,可能是在x64目錄中
3、工程中配置java.library.path為jri.dll所在的路徑
設置完成以後記得重新啟動eclipse
Java調用R環境配置問題:Cannot find JRI native library!