I am trying to load 'rJava' package in my Unix machine. Before loading I have set the path using
Sys.setenv("JAVA_HOME= myfilepath")
in my R script.
Despite this I am getting the following error (Below is the part of the error):
checking Java support in R... present:
interpreter : '/usr/lib/jvm/jre/bin/java'
archiver : '/usr/lib/jvm/jre/../bin/jar'
compiler : '/usr/lib/jvm/jre/../bin/javac'
header prep.: '/usr/lib/jvm/jre/../bin/javah'
cpp flags : '-I/usr/lib/jvm/java/include I/usr/lib/jvm/java/include/linux'
java libs : '-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... ./configure: line 3729: /usr/lib/jvm/jre/bin/java: No such file or directory
no configure: error: Java interpreter '/usr/lib/jvm/jre/bin/java' does not work
As you can see the error shows that /usr/lib/jvm/jre/bin/java: No such file or directory. But I have not set this as myfilepath. How do I prevent the installer from looking at this path?
Kindly help.
sudo R CMD javareconf
I had the same problem. rJava trying to check the directories which is not at all there in my system. But after running the above config command, it worked for me. – Manoj G