未找到sbt JRI库

时间:2016-05-03 06:05:55

标签: java java-native-interface sbt jri

我想使用rJava库与sc进行scala对话。不幸的是,在类路径中找不到JRI库。但是在我的sbt构建中,它直接包含在子目录中。

我的设置有什么问题? 可以在此处找到最小的示例:https://github.com/geoHeil/scalaRcran-rJava

执行sbt run会抛出错误

我的设置:

  • osx 10.11.4,java8(特别是
  • java版本" 1.8.0_74" Java(TM)SE运行时环境(版本1.8.0_74-b02) Java HotSpot(TM)64位服务器VM(内置25.74-b02,混合模式) ),Scala 2.11.8,R 3.2.4和CRAN当前的rJava库

通过sbt设置-Djava.library.path=externalLib/jri似乎根本没有效果。通过intelliJ设置此选项会导致不同的错误:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000012525cf42, pid=35822, tid=5891
#
# JRE version: Java(TM) SE Runtime Environment (8.0_74-b02) (build 1.8.0_74-b02)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.74-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libR.dylib+0x134f42]  GetNewPage+0x1a2
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/geoHeil/Downloads/rjaav/hs_err_pid35822.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Process finished with exit code 134

修改

运行运行脚本,示例在/Library/Frameworks/R.framework/Resources/library/rJava/jri文件夹中运行正常。

0 个答案:

没有答案