长郡朝阳国际实验学校:JRI configuration

来源:百度文库 编辑:九乡新闻网 时间:2024/07/14 10:19:02
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:
  • R_HOME must be set correctly
  • (Windows): The directory containing R.dll must be in your PATH
  • (Mac): Well, it's a Mac, so it just works ;).
  • (unix): R must be compiled using --enable-R-shlib and the directory containing libR.so must be in LD_LIBRARY_PATH. Also libjvm.so and other dependent Java libraries must be on LD_LIBRARY_PATH.
  • JRI library must be in the current directory or any directory listed in java.library.path. Alternatively you can specify its path with
    -Djava.library.path= when starting the JVM. When you use the latter, make sure you check java.library.path property first such that you won't break your Java.
  • Depending on your system, the R verison and other features you want to use, you may have to set additional settings such as R_SHARE_DIR, R_INCLUDE_DIR and R_DOC_DIR.
Again, I don't think you want to worry about all of the above - just use the start script!