简体   繁体   English

R无法在Eclipse中正确安装... Java问题?

[英]R not installing correctly in Eclipse … Java issues?

I'm trying to run R in the Eclipse environment. 我正在尝试在Eclipse环境中运行R。

I have followed all the necessary instructions from A Guide to Eclipse and the R Plugin in StatET [ http://www.splusbook.com/RIntro/R_Eclipse_StatET.pdf] however am coming up with the following Error; 我遵循了StatET中的Eclipse指南和R插件[ http://www.splusbook.com/RIntro/R_Eclipse_StatET.pdf]中的所有必要说明,但是出现了以下错误;

Launching the R Console was cancelled, because it seems starting the R engine failed. 启动R控制台已取消,因为它似乎无法启动R引擎。 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 'R'. 请确保已安装R软件包“ rj”(2.0或兼容版本),并且已为R环境配置“ R”正确设置了R库路径。

调试

I have installed RJ 1.1 as directed on one site, then installed 2.0. 我已经按照一个站点的指示安装了RJ 1.1,然后安装了2.0。 I dragged the contents of the zip into the library. 我将zip的内容拖到库中。

This is the image of the Environmental settings; 这是环境设置的图像;

在此处输入图片说明

The interaction ... 互动...

在此处输入图片说明

The Java ... Java ...

在此处输入图片说明

And the installation of RJ 1.1 in the library; 并在库中安装RJ 1.1;

C:\Program Files\R\R-3.1.2\library\rj

I have also followed this route of installation, RJava Eclipse Plugin as it seemed that Java was incorrectly installed, following the Error Details. 我也遵循了RJava Eclipse插件的这种安装方式,因为在错误详细信息之后,似乎Java的安装不正确。

I'm stuck. 我被卡住了。 I can't seem to figure out what is going on. 我似乎无法弄清楚发生了什么。 Does anyone have any ideas? 有人有什么想法吗?

Thanks, WEJ 谢谢,WEJ

I've managed to resolve the issue however am unsure exactly how, one of the options below was effective so I'd recommend trying them all to anyone with a similar problem. 我已经设法解决了这个问题,但是不确定确切如何,下面的一种选择是有效的,所以我建议对有类似问题的任何人都尝试一下。

  1. Check the install location of rj.gd. 检查rj.gd的安装位置。 If you for some reason, like I did, have two locations, check that the required files are in the location Eclipse is automatically selecting. 如果像我一样,由于某种原因您有两个位置,请检查所需文件是否在Eclipse自动选择的位置。 If there not, put them there, however as Roman points out make sure these are correctly installed. 如果没有,请将它们放到那里,但是正如罗马人指出的那样,请确保已正确安装它们。
  2. Re-start your PC after installation, not just the program. 安装后重新启动PC,不仅是重新启动程序。

It was one of those, so good luck. 那是其中之一,真是好运。

It could also be that you have had the wrong version of rj . 也可能是您使用了错误的rj版本。 The following should fix it: 以下应解决此问题:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM