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

后端 未结 9 851
独厮守ぢ
独厮守ぢ 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条回答
  •  Happy的楠姐
    2020-11-30 05:27

    Install 64 bit Java from https://java.com/en/download/manual.jsp.
    Then in windows cmd run
    setx PATH "C:\Program Files\Java\jre1.8.0_211\bin\server;%PATH%"
    (make sure your path is correct).

    Then in RStudio run
    Sys.setenv(JAVA_HOME="")

    Now, you should be able to run rJava!!

提交回复
热议问题