New Rengine (...); crash without errors

I am trying to configure JRI with Eclipse on a Windows 7 x64 system. I tried it once on my Laptop and it worked. Now this fails on my desktop, although all the settings for R, rJava and JRI are exactly the same.

I installed JRI and R Paths correctly: C:\Program Files\R\R-2.15.1\library\rJava\jri;C:\Program Files\R\R-2.15.1\bin\x64

Also I set R_DOC_DIR etc. in eclipse.

Every time I try to start new Rengine(...); It fails without any errors or exceptions. Debugging revealed: <terminated, exit value: 10>C:\Program Files\Java\jre6\bin\javaw.exe (01.10.2012 18:00:31)

Is there anything I can try? I am really worried that it works on my laptop, but not on my workstation, despite the same settings everywhere.

Edit: The code used to get the Rengine object.

 public static Rengine getRengine(){ if (re == null) createRengine(); return re; } public static void createRengine(){ if (re!=null) return; try{ if (!Rengine.versionCheck()) { System.err.println("** Version mismatch **"); System.exit(1); } String[] arguments = {"--save"}; re=new Rengine(arguments, false, null); if (!re.waitForR()) { System.out.println("Cannot load R"); return; } } catch (Exception e){ e.printStackTrace(); } } 

Edit: the last time I tried, I had an error (creating REngine worked, it never happened), R was not in the registry. After installing R 2.15.1, it worked again. Now, after a reboot, it is the same as before. The program crashes when creating REngine.

+4
source share
2 answers

I had the same problem. It turns out that I unchecked the box that asks me to make an entry in the registry with version number R. As soon as I allowed the installation program to work with this flag, it worked.

I would make sure your regedit looks like this: Screencap of regedit

Next: this works in a portable way ...

0
source

I am using R 3.2.2 and eclipse Mars on Windows 10 x64.

Today I encountered the described problem and worked a little. Finally, I found the main reason for the build path. Check if the following conditions are true:

1.) The following Java libraries from the JIRI folder on your hard drive should be included as (user) libraries:

  • Jiri.jar
  • REngine.jar
  • JRIEngine.jar

2.) The native jiri.dll library is located in the "i386" subfolder for x86, while for x64 it is available in the "x64" subfolder. The appropriate one should be added as a separate location of the native library to the Java build path of the eclipse project. Otherwise, the file may not be considered because it is not located in the JIRI main folder.

Best wishes

Philipp

0
source

Source: https://habr.com/ru/post/1437226/


All Articles