rJava install error “JAVA_HOME cannot be determined from the Registry”

后端 未结 9 876
独厮守ぢ
独厮守ぢ 2020-11-30 04:57

I am trying to load the rJava using the command:

 library(rJava)

But I get the following error:

 Error : .onLoad failed i         


        
9条回答
  •  难免孤独
    2020-11-30 05:22

    This has been killing me and I have tried multiple methods above, it doesn't work. After, I mix all solution to try and below process works for me.

    1. Install Java for 64 bit
    2. Run below code in windows command
      setx PATH "C:\Program Files\Java\jre1.8.0_171\bin\server;%PATH%"
      (please change the address acorrding to your dvm.dll real address)
    3. Run below in R studio Sys.setenv(JAVA_HOME="")
      Then I finally can run
      library(rJava)
      library(xlsx)

提交回复
热议问题