JAVA_HOME cannot be determined error with XLConnect

和自甴很熟 提交于 2020-01-15 05:32:08

问题


I'd apreciate your help: i'm trying to run XLconnect but I receive this error message:

> library("XLConnect", lib.loc="C:/Users/1144143929/Documents/R/win-library/2.15")
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: JAVA_HOME cannot be determined from the Registry
Error: package/namespace load failed for ‘XLConnect’

回答1:


Another point to check is that if your version of R is 32 byte, so must your Java version. Or, 64 byte must match 64 byte.

Second, I ended up adding to my PATH (I am on Windows 8) the location of the jv.dll file that XLConnect needs (I think that was the name of the file). I found the PATH through Control Panel and System Environment (and maybe more).

Third, the Java site will verify that you have Java installed.

Fourth, with the matching architecture and the PATH pointing to the needed .dll file, I rebooted and it all worked.

Good luck.




回答2:


Had the exact same problem. We run 64-bit Windows with 64-bit R. However, our Office and Java are both 32-bit for whatever reason.

Solution: Run the code in 32-bit R.




回答3:


Answer in link resolved my issue.

Before resolution, I tried by adding JAVA_HOME to windows environments. It resolved this error but created another issue. The solution in above link resolves this issue without creating additional issues.



来源:https://stackoverflow.com/questions/21711369/java-home-cannot-be-determined-error-with-xlconnect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!