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
16
votes
4 answers

Can't install rJava 0.9 on Ubuntu 10.04

I use R 2.13 from the CRAN apt repo for Ubuntu 10.04, and I'm trying to install Deducer, which requires JGR/rJava, but rJava refuses to build/install, complaining about being unable to build a JNI app. I tried sudo R CMD javareconf as suggested but…
Yang
  • 16,037
  • 15
  • 100
  • 142
16
votes
6 answers

Why does rJava not work on Ubuntu 14.04 using OpenJDK 7?

Hi I'm having issues with the rJava package from cran. I have installed sudo apt-get install openjdk-7-jdk sudo apt-get install r-cran-rjava and ran sudo R CMD javareconf # Java interpreter : /usr/bin/java # Java version : 1.7.0_55 # Java home…
Dr. Mike
  • 2,451
  • 4
  • 24
  • 36
15
votes
5 answers

Error: package or namespace load failed for ‘rJava’

So I have tried the previously proposed answer to my question. but I am still having the same error message: I am trying to load the rJava library in R library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x,…
flawa
  • 151
  • 1
  • 1
  • 4
14
votes
5 answers

How does one configure rJava on OSX to select the right JVM -- .jinit() failing

I installed rJava by calling install.packages("rJava") -- no problems seen However when I call: library(rJava) .jinit() I get: JavaVM: requested Java version ((null)) not available. Using Java at "" instead. JavaVM: Failed to load JVM:…
user1172468
  • 5,306
  • 6
  • 35
  • 62
14
votes
4 answers

How can I make rJava use the newer version of java on osx?

I am following this tutorial on rJava: http://cran.r-project.org/web/packages/helloJavaWorld/vignettes/helloJavaWorld.pdf I have made all the files as specified in the tutorial and installed the helloJavaWorld package, but once I run the…
qed
  • 22,298
  • 21
  • 125
  • 196
14
votes
4 answers

R-Project: xlsx package installation failure (due to java issues)

I was trying to install the xlsx package, unfortunately, there is an issue with Java, which I am unable to solve. Please find below the output produced when trying to install the package xlsx. Here's the output: R version 3.1.1 (2014-07-10) --…
tamasp
  • 171
  • 1
  • 1
  • 6
13
votes
1 answer

"Unable to run a simple JNI program" error message when installing rJava on R 3.6 for ubuntu bionic beaver

I have the very common problem that rJava does not install correctly on Ubuntu. This problem has been dsicussed in multiple places here, here, here, to name a few. The basic problem is that on installing the rJava package, the following error…
Jonno Bourne
  • 1,931
  • 1
  • 22
  • 45
12
votes
1 answer

Unloading rJava and/or restarting JVM

I would like to use rJava in combination with mcparallel but obviously the JVM cannot be forked. Therefore a separate JVM instance needs to be initiated for each child process, e.g: library(rJava) library(parallel) myfile <- system.file("tests",…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
11
votes
2 answers

Where do I start with rJava?

I am not a Java programmer. I program R and C++. I have some java code that I want to include in an R package. The basics of the program are this: Read data from standard input. Run a MCMC chain. output to a file. I want to convert this to R…
Andrew Redd
  • 4,632
  • 8
  • 40
  • 64
11
votes
3 answers

Rstudio Knit button fail to load rJava

The knit button of Rstudio is failing to knit rmarkdown (Rmd) files which includes the rJava package. However, if I use rmarkdown::render(), the same Rmd files render into html without problems. I can reproduce the error with the following…
JG11235
  • 563
  • 3
  • 11
11
votes
2 answers

Problems requiring rJava in Windows

I am using a 64-bit machine, with the latest version of R (3.1.2), the latest RStudio version (0.98.1091) and the latest JAVA (Version 8 Update 31). I tried to require rJava (rJava_0.9-6) and the result is the following…
Davi Moreira
  • 943
  • 3
  • 10
  • 23
10
votes
1 answer

Frustration using rJava to call a third party Java jar

I'm trying to use R to hook the Java code from the GSRad project. The GSRad Java code is available online and comes as a One-Jar project jar (I was not familiar with One-Jar until today). I can run the One-Jar file just dandy using the following…
JD Long
  • 59,675
  • 58
  • 202
  • 294
10
votes
3 answers

Another rJava library install error: rJava.rdb' is corrupt

I am having a time with java related packages this week. I finally got my RWeka working (see HERE), but now I'm having rJava issues. The package seems to load up fine, but when I load the library I get the following: Error in get(method, envir =…
j.Rinehart
  • 278
  • 1
  • 2
  • 10
10
votes
1 answer

write.xlsx function gives error when defining path with the file name but read.xlsx is fine

I have a problem with the write.xlsx2 function of xlsx R package. For instance, see the code below. main_path<-"~/mydir/" read.xlsx2(paste0(main_path,"my_input_excel.xlsx"), sheetIndex=1) a<-1 write.xlsx2(a,…
berkorbay
  • 443
  • 7
  • 22
9
votes
2 answers

R studio failing to use rJava lib and failing javareconf

I'm running Rstudio on its own server. Java is installed with good java_home and bin. R is installed. rJava is installed. Tried to do command: library("rJava") but had issues with libjvm.so, do following Rstudio recommandation I did sudo R CMD…
Vince
  • 111
  • 1
  • 4
1
2
3
40 41