不存在Java运行时,要求在R

时间:2018-12-29 13:29:11

标签: java r

我正在尝试在RStudio上运行“ H2O”包。我使用的代码如下。

 h2o.init(
nthreads = -1,
max_mem_size = "2G")

运行此程序时出现错误:

不存在Java运行时,要求安装。

Starting H2O JVM and connecting: ............................................................ 
[1] "127.0.0.1"
[1] 54321
[1] TRUE
[1] -1
[1] "Failed to connect to 127.0.0.1 port 54321: Connection refused"
Error in h2o.init(nthreads = -1, max_mem_size = "2g", ip = "127.0.0.1",  : 
  H2O failed to start, stopping execution.
In addition: Warning message:
In system2(command, "-version", stdout = TRUE, stderr = TRUE) :
  running command ''/usr/bin/java' -version 2>&1' had status 1

我也一点击运行1就知道了。我第一次单击“更多信息”,下载并安装了Java。现在,我已经安装了Java .dmg和.tar文件,但我一直收到这些错误。 在这个论坛上看到较早的答案,我也尝试了代码

h2o.init(nthreads = -1, max_mem_size = '2g', 
         ip = "127.0.0.1", 
         port = 54321)

但是都是徒劳的。有人可以指导我该怎么做吗?

0 个答案:

没有答案