R studio failling for using rJava lib and failling javareconf

I am running Rstudio on my own server. Java is installed with good java_home and bin. R. rJava installed.

I tried to execute the command: library("rJava") , but had problems with libjvm.so , follow the following Rstudio recommendations, I made sudo R CMD javareconf with root.

Here is the result of my javareconf:

 Java interpreter : /home/scoremd/jdk1.7.0_03/jre/bin/java Java version : 1.7.0_03 Java home path : /home/scoremd/jdk1.7.0_03 Java compiler : /home/scoremd/jdk1.7.0_03/bin/javac Java headers gen.: /home/scoremd/jdk1.7.0_03/bin/javah Java archive tool: /home/scoremd/jdk1.7.0_03/bin/jar NOTE: Your JVM has a bogus java.library.path system property! Trying a heuristic via sun.boot.library.path to find jvm library... Java library path: $(JAVA_HOME)/jre/lib/amd64:$(JAVA_HOME)/jre/lib/amd64/server JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64 -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux 

There seems to be a problem finding the path to the java library ... but my java is working fine and R too.

Can you help me? I did not get any solution from the support of RSTudio and the community (told me to ask in SO ....).

+8
r rstudio rjava
source share
1 answer

It's been a while since I used rJava and it was on Windows, but I have some notes that might help you:

  • Verify that the source JRI is in the directory specified in java.library.path
    • (also confirmed by Process Explorer , which is loaded by jri.dll )
  • The R process loads jvm.dll when you do library(rJava)

Replace jvm.dll my notes above with libjvm.so in your case, and jri.dll with any .so file related to you.

0
source share

All Articles