Questions tagged [rjava]

rJava is an interface between R and Java.

rJava is an R package providing interfaces between R and Java. As a package rJava allows R code to instantiate a Java VM, create Java objects and call Java methods. It also includes JRI (Java/R Interface) which conversely embeds R into a Java application.

613 questions
157
votes
13 answers

Using the rJava package on Win7 64 bit with R

I'm trying to install rJava on a computer with Win 7 64 bit. When I run install.packages("rJava") everything seems to be fine: Installing package(s) into ‘C:/Users/djq/Documents/R/win-library/2.13’ (as ‘lib’ is unspecified) trying URL…
djq
  • 14,810
  • 45
  • 122
  • 157
129
votes
18 answers

R: rJava package install failing

When installing rJava using the install.packages("rJava") command I get the following error: checking Java support in R... present: interpreter : '/usr/bin/java' archiver : '/usr/bin/jar' compiler : '/usr/bin/javac' header prep.:…
JD Long
  • 59,675
  • 58
  • 202
  • 294
125
votes
18 answers

rJava load error in RStudio/R after "upgrading" to OSX Yosemite

I recently "upgraded" from OSX Mountain Lion to Yosemite and from R 3.1.3 to 3.2. Immediately after the upgrade, when I opened R or RStudio I got a pop-up message saying that I needed to install Java 6. In addition, loading rJava or any package that…
eipi10
  • 91,525
  • 24
  • 209
  • 285
107
votes
10 answers

Problems when trying to load a package in R due to rJava

When I type require(xlsx) in order to load the package xlsx in R, the following messages is shown: > require(xlsx) Loading required package: xlsx Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in…
Pritam Kar
  • 1,071
  • 2
  • 7
  • 3
59
votes
11 answers

rJava install error "JAVA_HOME cannot be determined from the Registry"

I am trying to load the rJava using the command: library(rJava) But I get the following error: Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the…
Eric
  • 528
  • 1
  • 8
  • 26
56
votes
9 answers

Unable to load rJava on R

I wish to load rJava in R x64 3.1.2. OS- Windows 8.1 64 bit Though installation seems to work fine: > install.packages("rJava") Installing package into ‘C:/Users/sony/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) --- Please…
Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
54
votes
4 answers

Unable to install rJava in R 3.0 in Ubuntu 13.04

I am not able to call rJava package in R 3.0. I got the following message Error: package ‘rJava’ was built before R 3.0.0: please re-install it I am getting error when I tried to re-install rJava package. I have provided the output of R CMD…
vinux
  • 965
  • 1
  • 10
  • 16
49
votes
7 answers

R - Error : .onLoad failed in loadNamespace() for 'rJava'

While loading rJava package, I receive this error: Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object…
user3205469
  • 995
  • 1
  • 7
  • 16
38
votes
8 answers

R CMD javareconf not finding jni.h

I'm trying to install rJava in a docker container based on debian (jessie) with Anaconda. As root, I did $ apt-get update && apt-get install -y --no-install-recommends \ default-jdk default-jre libicu-dev Then $ R CMD javareconf Java…
dfrankow
  • 20,191
  • 41
  • 152
  • 214
34
votes
10 answers

libjvm.so: cannot open shared object file: No such file or directory

Trying to install the rJava package on R, on my 14.10 ubuntu, using this code if (!require(rJava)) install.packages('rJava') got few errors related to java including jni problems, after reinstalling the jdk, and tried to run the same code again,…
tan
  • 439
  • 1
  • 7
  • 10
34
votes
5 answers

Can't install rJava on ubuntu system

I've seen a few posts related to this...but all the suggested solutions ive seen dont seem to work....I am running R in an EC2 instance and ran the following commands to try and install rJava but to no avail...any help would be greatly appreciated. …
h.l.m
  • 13,015
  • 22
  • 82
  • 169
30
votes
3 answers

Error of java path on loading rJava package

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…
Aman Mathur
  • 709
  • 2
  • 15
  • 27
25
votes
1 answer

R: Cannot install rJava; what is r-api-3.4?

I am on an Ubuntu 18.04 machine with R version 3.5.1, installed following this link. I am trying to install the CRAN package rJava, which I do the following way (as seen here): sudo apt-get install r-cran-rjava However, I get this: The following…
DaniCee
  • 2,397
  • 6
  • 36
  • 59
25
votes
6 answers

Installation of rJava

I've tried to solve this using the previous questions/answers on SO but without any success. So, here's my problem. I'm using RStudio on and Ubuntu box (14.04) and I tried to upgrade rJava from sources and in the process I managed to lose it. I…
DarrenRhodes
  • 1,431
  • 2
  • 15
  • 29
17
votes
5 answers

.onLoad failed in loadNamespace() for 'rJava' when installing a package

I have a package "javaOnLoadFailed" (just a minimal package for testing my issue, hence the weird name) which imports rJava. I get 'rJava' errors when I try to either check() or install() the package, even though require(rJava) itself works fine.…
Aditya
  • 1,554
  • 1
  • 13
  • 23
1
2 3
40 41