[R] rJava not loading on Windows

Henrik Bengtsson hb at biostat.ucsf.edu
Wed Nov 7 21:18:31 CET 2012


Hi,

I've successfully used it on a Linux setup, but when I try to load
rJava on Windows 7 64-bit (session info below) I get:

% R --vanilla
> 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'
> traceback()
2: stop(gettextf("package/namespace load failed for %s", sQuote(package)),
       call. = FALSE, domain = NA)
1: library("rJava")


For the record, I have Java SDK installed and on the PATH:

> Sys.which("javac")
                                            javac
"C:\\PROGRA~1\\Java\\JDK17~1.0_0\\bin\\javac.exe"
> system("javac -version")
javac 1.7.0_02

> Sys.which("java")
                                            java
"C:\\PROGRA~1\\Java\\JDK17~1.0_0\\bin\\java.exe"
> system("java -version")
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

I'm sure there is at least one other Windows user who bumped into
this.  Any suggestions how to fix/troubleshoot this?

Thanks,

Henrik


> sessionInfo()
R version 2.15.2 Patched (2012-11-04 r61084)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
loaded via a namespace (and not attached):
[1] tools_2.15.2
> packageDescription("rJava")
Package: rJava
Version: 0.9-3
Title: Low-level R to Java interface
Author: Simon Urbanek <simon.urbanek at r-project.org>
Maintainer: Simon Urbanek <simon.urbanek at r-project.org>
Depends: R (>= 2.5.0), methods
Description: Low-level interface to Java VM very much like .C/.Call and
        friends. Allows creation of objects, calling methods and
        accessing fields.
License: GPL-2
URL: http://www.rforge.net/rJava/
SystemRequirements: java
Repository: CRAN
Date/Publication: 2011-12-11 10:41:33
Built: R 2.15.2; i386-w64-mingw32; 2012-10-31 19:21:34 UTC; windows


> sessionInfo()
R Under development (unstable) (2012-11-04 r61084)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
loaded via a namespace (and not attached):
[1] tools_2.16.0
> packageDescription("rJava")
Package: rJava
Version: 0.9-3.1
Title: Low-level R to Java interface
Author: Simon Urbanek <simon.urbanek at r-project.org>
Maintainer: Simon Urbanek <simon.urbanek at r-project.org>
Depends: R (>= 2.5.0), methods
Description: Low-level interface to Java VM very much like .C/.Call and
        friends. Allows creation of objects, calling methods and
        accessing fields.
License: GPL-2
URL: http://www.rforge.net/rJava/
SystemRequirements: java
Repository: CRAN
Date/Publication: 2011-12-11 10:41:33
Packaged: 2012-10-19 17:13:34 UTC; biocbuild
Built: R 2.16.0; i386-w64-mingw32; 2012-10-19 17:36:53 UTC; windows



More information about the R-help mailing list