0

I'm at a loss as to why this seems so challenging, but isn't that what always separates us into two piles.

Here's what I have;

    - Today April 27th 2019
    - MacOSX - High Sierra version 10.13.6
    -- older MacBook Air 2010 build
    - RStudio - Version 1.1.453
    - h2o downloaded from within RStudio
    -- from http://h2o-release.s3.amazonaws.com/h2o/latest_stable_R/src/contrib/h2o_3.24.0.2.tar.gz
    -- installed in RStudio and library active

attempting to run

h2o.init()

H2O is not running yet, starting it now...
Error in .h2o.startJar(ip = ip, port = port, name = name, nthreads = nthreads,  : 
  Your java is not supported: java version "1.6.0_65"
Please download the latest Java SE JDK 8 from the following URL:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Slightly more elaborate version provides exact same result

h2o.init(ip = "localhost", port = 54321, name = NA_character_,
         startH2O = TRUE, forceDL = FALSE, enable_assertions = TRUE,
         license = NULL, nthreads = -1, max_mem_size = NULL,
         min_mem_size = NULL, ice_root = tempdir(), log_dir = NA_character_,
         log_level = NA_character_, strict_version_check = TRUE,
         proxy = NA_character_, https = FALSE, insecure = FALSE,
         username = NA_character_, password = NA_character_,
         cookies = NA_character_, context_path = NA_character_,
         ignore_config = FALSE, extra_classpath = NULL,
         jvm_custom_args = NULL, bind_to_localhost = TRUE)

from terminal

java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (Zulu 8.38.0.13-CA-macosx) (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (Zulu 8.38.0.13-CA-macosx) (build 25.212-b04, mixed mode)

On surface it seems that h2o and the Terminal are thinking two different version of Java are the current version.

Using SDKMAN in terminal

sdk list java
================================================================================
Available Java Versions
================================================================================
     13.ea.18-open       10.0.2-zulu         1.0.0-rc-15-grl                    
     12.0.1-sapmchn      10.0.2-open         1.0.0-rc-14-grl                    
     12.0.1-zulu         9.0.7-zulu                                             
     12.0.1-open         9.0.4-open                                             
     12.0.1.j9-adpt  > * 8.0.212-zulu                                           
     12.0.1.hs-adpt      8.0.212-amzn                                           
     12.0.1-librca       8.0.212.j9-adpt                                        
     11.0.3-sapmchn      8.0.212.hs-adpt                                        
     11.0.3-zulu         8.0.212-librca                                         
     11.0.3-amzn         8.0.202-zulu                                           
     11.0.3.j9-adpt      8.0.202-amzn                                           
     11.0.3.hs-adpt      8.0.202-zulufx                                         
     11.0.3-librca       7.0.222-zulu                                           
     11.0.2-open         7.0.181-zulu                                           
     11.0.2-zulufx       1.0.0-rc-16-grl                                        

================================================================================
+ - local version
* - installed
> - currently in use
================================================================================

Sadly, I've tried so many things from various threads that it's probably not even worth going into them. Basically after countless changes, downloads, restarts, etc.... none of them have changed the end result when trying to initiate h2o in RStudio.

Thoughts?

  • From inside the R session try manually setting the JAVA_HOME environment variable such that $JAVA_HOME/bin/java is the java8 that you want H2O to use. – TomKraljevic Apr 27 '19 at 17:15
  • Sorry, I don't seem to be able to find any instruction on setting JAVA_HOME in the R session. – Ghetto Counselor Apr 27 '19 at 20:55
  • 1
    See https://www.rdocumentation.org/packages/base/versions/3.5.3/topics/Sys.setenv. There's good discussion on a similar issue here: https://stackoverflow.com/questions/27661325/unable-to-load-rjava-on-r. – Joe Apr 28 '19 at 01:22
  • You can set the environmental variable in R by Sys.setenv(JAVA_HOME='path/to/java'). – vaclav Apr 29 '19 at 09:17
  • '> Sys.setenv(Java_home="\\Library\\Java\\JavaVirtualMachines\\jdk1.8.0_212") > Sys.getenv("Java_home") [1] "\\Library\\Java\\JavaVirtualMachines\\jdk1.8.0_212" > > h2o.init() H2O is not running yet, starting it now... Error in .h2o.startJar(ip = ip, port = port, name = name, nthreads = nthreads, : Your java is not supported: java version "1.6.0_65" Please download the latest Java SE JDK 8 from the following URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html' Still not working, I tried double slashes both / and \ same error each time. – Ghetto Counselor Apr 29 '19 at 12:46
  • As a next step, please confirm the `JAVA_HOME` path contains a bin folder. What is the terminal output of `ls /Library/Java/JavaVirtualMachines/jdk1.8.0_212`? Note that your goal is to set `JAVA_HOME` such that `$JAVA_HOME/bin/java` points to an existing folder. – Joe Apr 30 '19 at 15:05

0 Answers0