2

I've been trying to install the rj package for R, but i'm having the following error:

C:\Program Files\R\R-2.11.1-x64\bin>R CMD INSTALL --no-test-load \M\rj_0.5.2-1.tar.gz
* installing to library 'C:\Users\MyUser\Documents/R/win64-library/2.11'
* installing *source* package 'rj' ...
** R
** inst
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dirname(this$RuntimeLib)
  error: a character vector argument expected
ERROR: lazy loading failed for package 'rj'
* removing 'C:\Users\MyUser\Documents/R/win64-library/2.11/rj'

Note that i'm using windows 7 64 as well as Java and R 64 bits (currently i have no 32 bits installation of java).

Thanks in advance

3 Answers 3

1

After you installed rJava and JDK >1.4, check whether the path variable to Java is set correctly. Then do:

R CMD javareconf 

at the command line for configuration of R with java support. After this rj should install just fine.

3
  • It just says: 'javareconf' is not recognized as an internal or external command, operable program or batch file. Commented Jan 20, 2011 at 18:53
  • C:\Program Files\R\R-2.11.1-x64\bin>java -version java version "1.6.0_23" Java(TM) SE Runtime Environment (build 1.6.0_23-b05) Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode) Commented Jan 20, 2011 at 18:55
  • INSIDE R > library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument expected Error: package/namespace load failed for 'rJava' Commented Jan 20, 2011 at 18:58
0

I'm don't know what was appening, but i removed R, removed eclipse and then reinstall them, first r, the rJava package, then the rJ package and then i installed the Statet plugin in eclipse, and all worked out well.

I have also removed the .eclipse folder in c:\users\myuser\

For the r installation i made a complete install (i386 and x64). For the eclipse x64 only.

Hope this helps you mickylarson.

0

For Win 7(64Bit) & R x64 environment, you must install a JRE 64bit image. I did also encounter this issue when I use R x64 but only install JRE 32bit, but when I switch to R i386 window, this issue was gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.