1

I want to call an R script using Java. I am trying the JRI method to call the R script. However my JVM gets terminated when creating an Rengine.

I am running one of the examples which has been provided alongside rJava library installation in R.

Code I have tried

Version 1:

`Rengine re=new Rengine(args, true, new TextConsole2());`

Version 2:

`Rengine re=new Rengine(args, false, new TextConsole());`

Version 3:

`Rengine re = new Rengine(new String[] { "--vanilla" }, false, null);`

All three have terminated the JVM while they were getting executed.

I am using STS 3.9.1 and have exposed the below variables before running the Java program java.library.path - pointing to the r java dll's R_HOME - pointing to the R.exe PATH - reinforcing the systems path with the paths of rJava dll's and R.exe

I am using R-3.5.0, followed all steps as per Study Trails - R and Java

and Mavlarn - R and Java but still facing the same issue. What could I be doing wrong ?

Anup Hegde
  • 11
  • 1
  • Followed the solution on the link [https://stackoverflow.com/questions/28974392/setting-up-java-r-interface-jri-on-windows](https://stackoverflow.com/questions/51650780/jri-program-terminates-java-during-rengine-creation) – Anup Hegde Aug 02 '18 at 12:17

0 Answers0