I wanted a “lightweight” version of Eclipse to run R from Ubuntu. (I installed eclipse-pde using apt-get. It worked fine.) Once it was running, I installed StatEt via the “Install new software” feature from http://download.walware.de/eclipse-3.5. While it was downloading, I opened up an R console and ran install.packages("rJava"). When the installation of both StatEt and rJava finished I restarted Eclipse. This is when things stopped working and I couldn’t really find any step-by step directions on how to proceed. Here is what I did:
- Run -> Run Configurations
- Click on R-Console in the left pane. This will create a new run configuration. Change the name to “R 2.10″
- Click on the “R_Config” tab. Choose “Selected Configuration:” and then hit the “Configure…” button.
- Click “Add”. Change “Location (R_Home):” to “/usr/lib/R” and click “Detect Default Properties/Settings” Click “Ok” until you are back to the “Run Configurations” window
- This is the important step. Without it you will get
Launching the R Console was cancelled, because it seems starting the Java process/R engine failed.
Please make sure that R package 'rJava' with JRI is installed and look into the Troubleshooting section on the homepage.
Click on the JRE tab. In the “VM Arguments” box add
-Drjava.path=/home/<username>/R/i486-pc-linux-gnu-library/2.10/rJavaWhere <username> is your username. (You are providing the path to rJava, for some reason, even though Eclipse will detect it during the setup in the “R_Config” step, it doesn’t seem to share that information with the JRE.)
- Click Run. It should work.
Should work and does! Thanks!
Brilliant post! it solved the most terrible and difficult to crack problem!
Thanx man
Great! “Detect Default Properties/Settings” and “VM Arguments” are not really documented. You saved me a lot of time and frustration
Was very happy to find this post to a vexing problem!
Strangely though, I did as suggested, but the problem did not go away.
Ubuntu-10.04, R version 2.14.1 (2011-12-22) and rJava installed.
Anything more that one should look for? Thanks in advance.
@Leo: I don’t run StatEt in Eclipse anymore so I can be of only limited help. I would reccomend that you check out Luke Miller’s blog. This post in particular gives updated information about running StatEt with newer versions of R. Hope this helps!