error: No CurrentVersion entry in Software/JavaSoft registry!
error: No CurrentVersion entry in Software/JavaSoft registry!. When receiving the following problem while trying to install package xlxs in R.
Error: package or namespace load failed for ‘xlsx’: .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: No CurrentVersion entry in Software/JavaSoft registry!
There is no entry for CurrentVersion in the Software/JavaSoft register! Reinstall Java and double-check that R and Java have the same architecture.
The problem will persist if you try to reinstall Java.
Error in x[6, ]: subscript out of bounds »
The error usually arises when the architectures of java and r (32/64 bit) do not match.
In cmd, use java -version to verify the version of Java.
You can resolve the issue by doing the following setup.
Step1:-Open Rstudio > tools > global options
Step2:-general settings > R-version > change (to the architecture same as that of java)
Step3:-Apply
Yes, That’s all issue solved. Now you can load the package.
Nice! / I’d recommend to avoid Java dependency, if possible, e. g. via openxlsx.
Yes…No doubt…
Few users are likely to be familiar with the xlsx package, therefore this solution will be beneficial to them.