1
votes
base) stephen@stephen-Aspire-5250:~$ java --version
java 13.0.1 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
(base) stephen@stephen-Aspire-5250:~$ find . -name h2o.jar
./R/x86_64-pc-linux-gnu-library/3.4/h2o/java/h2o.jar

then from R

> h2o.init()

H2O is not running yet, starting it now...
Error in .h2o.checkJava() : 
  Cannot find Java. Please install the latest JRE from
http://www.oracle.com/technetwork/java/javase/downloads/index.html

I have a feeling conda is messing up the landscape, but don't know how to fix. I started h2o from terminal with:

java -jar ~/R/x86_64-pc-linux-gnu-library/3.4/h2o/java/h2o.jar

and then the h2o.init() from R works. Still, don't why h2o cannot find java, which is on my PATH.

1

1 Answers

0
votes

H2O gets its path to java runtime from JAVA_HOME environment variable, so make sure to set it properly for/from R if you have to use h2o.init() rather than system shell/bash (e.g. with java -Xmx1g -jar ./h2o.jar).

More info

After several years of experience with H2O in Ubuntu/Centos/RHEL I now start H2O only from bash (issuing richly parameterized commands at H2O docker container startup), rather than with R or python API functions (it led to all sorts of problems, such as using all server CPU cores that yielded huge performance degradation for the inexperienced users or exposing passwordless REST API with root file access over standard H2O port to the entire corporate network...).

As a side note, Java 13 is supported by latest H2O versions, but I would still recommend using LTS versions, currently 11, for security reasons. The same of course applies to Ubuntu itself.