Cannot load rJava because cannot load a shared library

后端 未结 6 495
陌清茗
陌清茗 2020-12-31 13:53

I have been struggling to load the rJava package in R.

I get the following messages

> library(rJava)
Error in inDL(x, as.logical(local), as.logic         


        
6条回答
  •  隐瞒了意图╮
    2020-12-31 14:43

    System information: R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit)

    I encountered this same problem. I was able to solve the issue with one line of code into the command window obtained from this website.

    Sys.setenv(JAVA_HOME='C:\Program Files\Java\jre7')

    Note that I used this particular line because I was on a 64 bit system. See website for 32-bit example.

提交回复
热议问题