R: error: package or namespace load failed for ‘rjava’:

question:

during the course of running R, you usually need to call rjava.dll to run the virtual environment. For example, when importing the package library(XLSX), an error occurs:

> Library (XLSX)
load required package: rJava
Error: package or namespace load failed for ‘rJava’ :
loadNamespace() calculate ‘rJava’. OnLoad failed,
call: inDL(x, as. Logical (local), as. Logical (now)…
error: unable to load Shared object ‘D:/Program Files (x86)/R/R – 3.4.2/library/rJava/libs/x64/rJava DLL’ :
LoadLibrary failure: can’t find the specified module.

Error: unable to load the program package ‘rJava’

. In this case, the JAVA class library rjava.dll is installed again after installing other software in the system, and the R running environment cannot call the confirmation item. Rjava.dll:

> Sys. The setenv (JAVA_HOME = “D:/Program Files (x86)/Java/jdk1.8.0 _144/jre ‘)

> run library(XLSX) again, and you’re done!

> Library (XLSX)
load needed packages: rJava
load needed packages: xlsxjars

Read More: