Cannot load rJava because cannot load a shared library

后端 未结 6 497
陌清茗
陌清茗 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:49

    For what it's worth, putting C:\Program Files\Java\jre6\bin\[server] in my PATH worked for me. It seems the rJava module could jot find jvm.dll there.

    Here are the versions of R and Java that I'm using (on 64-bit Windows 7).

    Java:

    java version "1.6.0_30"
    Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
    

    R:

    R version 2.14.1 (2011-12-22)
    Copyright (C) 2011 The R Foundation for Statistical Computing
    ISBN 3-900051-07-0
    Platform: x86_64-pc-mingw32/x64 (64-bit)
    

提交回复
热议问题