

Wherever yours is, add that directory to your windows PATH variable. Or C:\Program Files\Java\jre6\jre\bin\client It resides in a folder like C:\Program Files\Java\jdk1.6.0_25\jre\bin\server RJava, the RJava bridge, will need jvm.dll, but R will have trouble finding that DLL. There are several possibilities, but most have fatal flaws.
R LIBRARY RJAVA HOW TO
Here is some quick advice on how to get up and running with R + rJava on Windows 7 64bit. I have not revisited this issue recently to know if all the steps below are still necessary.)

(Note: many of folks in other answers/comments have said to remove JAVA_HOME, so consider that. Experts only: to build rJava from source, you need the -merge-multiarch flag: install.packages('rJava', type = 'source', INSTALL_opts='-merge-multiarch') The binary package from CRAN should pick up on the jvm by itself.
R LIBRARY RJAVA INSTALL
Hence the latest working multi-arch setup is to install both jdk-8u172-windows-i586.exe and jdk-8u172-windows-圆4.exe and then the binary package from CRAN: install.packages("rJava") On Win 64, the former installs in C:\Program files\Java\ and the latter in C:\Program Files (x86)\Java\ so they do not conflict.Īs of Java version 9, support for x86 (win32) has been discontinued. To build or check R packages with multi-arch (the default) you need to install both Java For Windows 圆4 as well as Java for Windows x86.To use rJava in 64-bit R, you need Java for Windows 圆4.To use rJava in 32-bit R, you need Java for Windows x86.The latest CRAN version of rJava will find the jvm.dll automatically, without manually setting the PATH or JAVA_HOME. Is the problem just that rJava does not run in R 64 bit? How can I tell if a package is just for 32 instead of 64?Įdit: just posted R.version(): > R.Version() If I try using 32 bit R, I can load rJava fine. My R version is R version 2.13.1 () and I'm using RStudio.
R LIBRARY RJAVA 64 BIT
I have installed the Java JRE (trying both 32 and 64 bit versions) and the JDK (using both 32 and 64 bit). LoadLibrary failure: %1 is not a valid Win32 application.Įrror: package/namespace load failed for 'rJava' )Įrror: unable to load shared object 'C:/Users/me/Documents/R/win-library/2.13/rJava/libs/圆4/rJava.dll': onLoad failed in loadNamespace() for 'rJava', details:Ĭall: inDL(x, as.logical(local), as.logical(now). Package 'rJava' successfully unpacked and MD5 sums checkedīut when I tried to load the library library(rJava) I get the following error: Error. When I run install.packages("rJava")Įverything seems to be fine: Installing package(s) into ‘C:/Users/djq/Documents/R/win-library/2.13’Ĭontent type 'application/zip' length 654936 bytes (639 Kb) I'm trying to install rJava on a computer with Win 7 64 bit.
