I am trying to use the XLConnect library in R. If I run
library(XLConnect)
The following error message appears:
JAVA_HOME cannot be determined from the Registry
To solve this problem, I first set the JAVA_HOME variable:
Sys.setenv(JAVA_HOME='C:/Program Files (x86)/Java/jre1.8.0_65') library(XLConnect)
It seems like this helps me move on, but then I get another problem:
unable to load shared object 'C:/Program Files/R/R-3.2.2/library/rJava/libs/x64/rJava.dll'
I wonder why R cannot load rJava.dll . At least this file is in the folder where R is looking for it:
C:\Program Files\R\R-3.2.2\library\rJava\libs\x64
ADDED
Note that the rJava.dll file exists, and it is where R is looking for it. I assume the problem is incompatibility between 32-bit and 64-bit versions. I assume that since R complains:
% 1 is not a valid Win32 application
Well, why does R expect this to be a Win32 application`? First, my OS is 64bit, second my Java is also for the 64bit and finally, the `rJava.dll` object is located in the folder with Win32 application`? First, my OS is 64bit, second my Java is also for the 64bit and finally, the `rJava.dll` object is located in the folder with x64` in the name (so I assume this is also a 64-bit version).
r xlconnect
Roman
source share