R - Error : .onLoad failed in loadNamespace() for 'rJava'

前端 未结 6 1196
北荒
北荒 2020-11-28 09:45

While loading rJava package, I receive this error:

Error : .onLoad failed in loadNamespace() for \'rJava\', details:
  call: inDL(x         


        
6条回答
  •  囚心锁ツ
    2020-11-28 10:32

    I encountered the same problem. Be sure to check the file path for Java. To solve the error I needed to download 64bit Java version. However the following code in R did not work as the folder was incorrect for the latest version for Java:

    Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre7') # for 64-bit version
    

    Instead I changed the name to:

    Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre1.8.0_144') 
    

    Hope that helps

提交回复
热议问题