runningbirds
runningbirds

Reputation: 6615

Java issue with h2o - not recognizing java version

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.

Upvotes: 3

Views: 5627

Answers (1)

Pasqui
Pasqui

Reputation: 621

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.

Upvotes: 3

Related Questions