[R] Java, rJava, and Windows x64

Robert Baer rbaer at atsu.edu
Mon Oct 29 16:17:00 CET 2012


When running [1] "R version 2.15.1 (2012-06-22)" "x86_64-pc-mingw32", 
rJava fails. I have installed both the 32-bit and 64-bit versions of 
Java 7 update 9.

 > library(rJava)
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: stop("No CurrentVersion entry in '", key, "'! Try re-installing 
Java and make sure R and Java have matching architectures.")
error: object 'key' not found
Error: package/namespace load failed for ‘rJava’
 >

It appears that rJava was not seeing the x64 Java. For clarity, I 
installed the 32-bit java library second, and I imagined this might be 
the problem. The Java installer told me that it was already present, and 
the x64 library appeared to be working with the 64-bit IE9 browser

Indeed, reinstalling Java x64, the rJava package iloaded fine with the 
library(rJava) command in 64-bit R. rJava could STILL be loaded with 
library(rJava) within x86 R.

My question is, should the order of Java installation affect the ability 
of rJava to load under 64-bit R? Are there environmental variables or 
registry settings that should be checked in such cases or is it 
literally necessary to do a complete reinstall?

Rob



More information about the R-help mailing list