Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Architect / StatET: Launching R Console was cancelled because R engine failed

Tags:

r

statet

I recently upgraded to Architect version 0.9.7 on my Win 7 machine. However, after starting Architect, the RJ console wouldn't launch and I got the error message:

‘Launching the R Console was cancelled, because It seems starting the R engine failed.”
Please make sure that R package 'rj' (2.0 or compatible) is installed and 
that the R library paths are set correctly for the R environment 
configuration 'Embedded R Server'.

I installed the packages ‘rj’ and ‘rj.gd’ through the RTerm run console (which does happen to work) within Architect using the command suggested on www.walware.de:

install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.0")

Then, I restarted windows, and restarted Architect. Same error message. I zoomed in on the details of the error message and noticed the following line:

SEVERE: Path to rj package not found. Use R_LIBS or java property 
       'de.walware.rj.rpkg.path' to specify the location. 

So I opened an RTerm run console to check whether any of my .libPaths() locations contains the directories ‘rj’ or ‘rj.gd’. Oddly enough, they do. My first .libPaths path contains both packages. So that doesn’t seem to be the reason. How could this be fixed?

like image 912
Aditya Avatar asked Jul 28 '15 08:07

Aditya


1 Answers

I received prompt and helpful feedback from Open Analytics (thanks!), who informed me that the problem is due to changes in Java 8. With Java 7, Architect works fine. The next release of Architect will incorporate the changes in Java 8.

In order to get it work with Java 7, enforce the use of a specific Java Runtime, by using the -vm argument in the architect.ini file as follows:

-vm
C:\Program Files\Java\jre7\bin\javaw.exe

(mind the line break, which is required)

This is particularly useful if you have several Java versions on your system where the default Java is not suitable for use with Architect. The architect.ini file is found directly at the top level of the installation folder of Architect. You can find out where this is by looking at the Properties of the Architect shortcut on your desktop.

N.B. the -vm argument should be put before the -vmargs argument otherwise it is simply ignored!

N.B. examples of -vm specification on GNU/Linux and Mac OS X:

http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Linux_Example

http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example

like image 83
Aditya Avatar answered Nov 04 '22 17:11

Aditya