简体   繁体   中英

rJava Package installation failed (needed for xlsx package)

When I want to install the xlsx package, I get this error :

Loading required package: rJava

Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry In addition: Warning message: package 'rJava' was built under R version 3.3.3 Error: package 'rJava' could not be loaded

So I tried reinstalling rJava , but I get this :

Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry In addition: Warning message: package 'rJava' was built under R version 3.3.3 Error: package or namespace load failed for 'rJava'

Do you guys have any simple solution to this ? I am not very familiar with R, and I just need it to bootstrap some data.

I had the same error recently ( R Error: JAVA_HOME cannot be determined from the Registry ). I found the solution here . In brief, Joachim Schork identified the problem as not the xlsx package but rather the rjava package. He explained that the problem usually is, as hartmut said, running a 64 bit version of R and a 32 bit version of Java. To resolve the problem according to his recommendation, you need to download and install the 64 bit version of Java. In my case, the solution included installing Java on my machine as it was never installed previously.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM