3

I've always used a Mac and don't remember encountering this in the past so I'm not sure what I'm doing wrong. Theres a bit of q's on this on the internet already but I didn't find a solution yet for me.

I just got a new mac and I'm trying to use rJava & h2o specifically. Below is a couple of things I ran and the output from them. Can someone help me out?

Java --version

java --version java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Javac --version

javac 10.0.1

/usr/libexec/java_home -V

Matching Java Virtual Machines (2): 10.0.1, x86_64: "Java SE 10.0.1" /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home 1.8.0_171, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home

Sys.getenv('JAVA_HOME')

"/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"

library(h2o)
h2o.init()

H2O is not running yet, starting it now... Error in value[3L] : You have a 32-bit version of Java. H2O works best with 64-bit Java. Please download the latest Java SE JDK 7 from the following URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

I definitely have the 64 bit of java installed as I re-installed it to be sure and see above the x64 notification from the output. Also, I have gotten this to work on another computer and so I don't understand what is going on with this one.

I also did

vim ~/.bash_profile
EXPORT JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"

but this doesn't seem to help me target the Java 8.

runningbirds
  • 6,235
  • 13
  • 55
  • 94
  • 1
    I just wanted to point out / clarify that H2O does not use rJava, it sounds like you are suggesting that rJava is required by H2O. – Erin LeDell Apr 30 '18 at 21:38

1 Answers1

3

You have various problems.

H2O currently does not support Java 10 (that you are using). You need to use Java 8 or Java 7.

Supported versions include: Java 7 or later. Note: Java 9 is released, but is not currently supported. Java 9 support will be added in an upcoming version.h2o website

For rJava on Mac I send you to Loading rJava on Mac OS High Sierra

I am running h2o on a mac with high sierra (and rJava, for a different project) with R v. 3.4.4 and Java 8. All good.

Pasqui
  • 591
  • 4
  • 12
  • I got Rjava to work by installing the Java 8 on the website - JDK 1.8.0_171. However, I'm not able to get h2o work. when I use H2o I still get java version "10.0.1" 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode). I adjusted my .bash_profile to be --> export JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk" export LD_LIBRARY_PATH = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/lib/server" export PATH=$PATH:$JAVA_HOME/bin – runningbirds Apr 27 '18 at 14:46
  • 2 things: 1. how did you install/build h2o? (I suggest this one http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/8/index.html); 2. R: are you in the terminal or in RStudio? – Pasqui Apr 27 '18 at 16:10
  • actually @Pasqui , I'm having a bit of trouble. Somehow it broke and I'm not allowing it to work anymore.. I updated the post with a description. – runningbirds May 02 '18 at 22:59