s-u / rJava

R to Java interface

Home Page:https://RForge.net/rJava

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I am unable to install rJava

bhattmaulik opened this issue · comments

I am unable to install rJava on a Windows system after the latest update. I have updated everything: R, RStudio and Java. In my first attempt to install, it gave me error that rJava can't open the registry, and I should try setting JAVA_HOME manually. Using Java, I found the path of JRE file, and added it in JAVA_HOME system variable. (The path is C:\Program Files\Java\jre1.8.0_301\bin\javaw.exe). After setting this in the system variable, when I try to install it, it gives me another error:
WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'

Then I tried the command "install.packages("rJava", repos="http://rforge.net",IGNORE=1)", but that also gives me the same error. How can I solve this issue?

You didn't say what you are trying to do, but I would strongly discourage you from trying to compile the package as that requires tools and a full JDK. If you just want to use it, simply install it from CRAN using install.packages("rJava"). Make sure you have installed the correct Java version and architecture that matches your R. Your JAVA_HOME setting is wrong, it has to point to the JDK or JRE home, not the any executables so as the instructions say, do not set it, rather fix your Java installation by re-installing the correct Java architecture.