Does XLConnect package work with Java 8?

2020-04-16 01:41发布

问题:

I updated my Java version and deleted the older versions of Java. Now my XLConnect package will not load in R because XLConnectJars won't load. Here is the error message.

Loading required package: XLConnectJars
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R     and Java have matching architectures.
Error: package ‘XLConnectJars’ could not be loaded

Is the only solution to reinstall an older version of Java?

回答1:

Try to define the path

options(java.home="C:/Program Files/Java/jre7/")

Change it appropriately



回答2:

What works for me in Windows 7 is:

options(java.home="C:\\Program Files\\Java\\jre1.8.0_45")
library(rJava)

after downloading the latest 64-bit Java version 8 from

http://java.com/en/download/manual.jsp


标签: java r xlconnect