Error Description:
> Library (xlsx)load the required thread bundle: RjavaError:loadnamespace () in the ' Rjava '. OnLoad failed, details:Call: InDL (x, as.logical (local), as.logical (now), ...)Error: Unable to load shared object ' C:/pogram Files/r/r-3.0.2/library/rjava/libs/x64/rjava.dll ':LoadLibrary Failure: The specified module could not be found. Error: Unable to load the process package ' Rjava '
Error Analysis:Rjava calls require a Java Runtime environment (that is, the JRE), if "Unable to load the package ' Rjava '" means there is no Java runtime environment or the Java Runtime environment is out of the question.
Workaround:
- If the JRE is installed, or if it is not installed, you can download the new version of JRE (http://www.oracle.com/technetwork/java/javase/downloads/ index.html), personal comparison recommended direct download JDK,JDK and JRE differ below, the JDK comes with a JRE, not a new JRE. Note that the JRE version needs to be the same as the R version, which is the 64-bit installation of R, and the JRE needs to be 64-bit.
- If this error still occurs after installation, it may be because of an error in the configuration of the Java environment variable. The environment variable configuration can be referenced below.
Development Files and directories
The respective roles of the JRE and JDK:
The JRE is installed, which is the Java Runtime environment. You can run a well-crafted Java program. That is, a program with the suffix named "Class". such as Appjava.class.
With the JDK installed, you can compile the Java source code, build the Java program, and run it. For example, compile Appjava.java, generate Appjava.class, and run with JRE.
here are the environment variables I configured:
java_home: D:\Android\jdk1.8.0_25
Generally used to indicate the JDK installation directory, this variable can also not be set, but the advantage of the setting is that when we need to change a JDK, we only need to modify the value of Java_home.
Path: .; %java_home%\bin;%java_home%\jre\bin\server;
The system variable path tells the operating system executable file (*.exe, *.bat, etc.) where the path, when the OS (operating system) found a *.exe, windows by default from the current directory to find this command, if not found, the OS will go to path set to find that command, And then execute.
The system default system variable is:%SYSTEMROOT%;%SYSTEMROOT%/SYSTEM32;%SYSTEMROOT%/SYSTEM32/WBEM
That is, in the above 3 directories (multiple variables separated by semicolons) in the *.exe file, can be executed anywhere (commands that can be executed directly in the Run window, like CMD, etc., basically in the top 3 directories), so they can run directly.
CLASSPATH: .; %java_home%\lib;%java_home%\lib\tools.jar;
Classpath is specifically for Java, which is equivalent to Windows Path;path for the entire windows.
Classpath tells the Java Virtual Machine (JVM) where to put the *.class files to be used or executed.
Running the program with the JVM requires setting the path to the CLASSPATH,JVM default lookup class file, which is the current path.
There is no relationship between classpath casing in Windows, and the other environment variable names.
Reference Document: http://blog.csdn.net/luinstein/article/details/5019806
About library (Rjava) loading and environmental variables Java_home, Path, classpath respective meanings