How to change java path used by H2O R

4,582 views
Skip to first unread message

hata...@gmail.com

unread,
Jul 29, 2015, 12:05:34 AM7/29/15
to H2O Open Source Scalable Machine Learning - h2ostream
I am trying to initialize H2O in R on a machine where I have no admin rights. On the machine two JDK versions are installed: jdk 1.7.0_25 and Java 1.8.0_20. The system path includes both but 1.8 is listed first and therefore java -version gives me 1.8.0_20. When trying to initialize H2O in R I get the error:

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.

Can I somehow point H2O to the 1.7 installation?

Tom Kraljevic

unread,
Jul 29, 2015, 12:59:38 AM7/29/15
to hata...@gmail.com, H2O Open Source Scalable Machine Learning - h2ostream

This is a bit of an unhappy situation, but I recommend trying to start the H2O manually in this case:


step 1: from a command line prompt, try to start the h2o server manually:

java -jar h2o.jar

You can give the full path to java if you want to. H2O works with both Java 7 and Java 8.

If needed, you can download a standalone H2O from here:
http://h2o.ai/download/


step 2: from R, connect to the already-running h2o server:

h2o.init(startH2O = FALSE)


Tom
> --
> You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

hata...@gmail.com

unread,
Jul 29, 2015, 1:14:53 AM7/29/15
to H2O Open Source Scalable Machine Learning - h2ostream, to...@h2o.ai
Worked thanks :-)

reinhol...@gmail.com

unread,
Mar 15, 2016, 5:41:11 AM3/15/16
to H2O Open Source Scalable Machine Learning - h2ostream, hata...@gmail.com

I have a similar problem :
Installed on my PC is the 64-Bit Java 1.8.0_73.
For R I'm using the latest version of RStudio.
Loading the h2o library is ok but when running the h2o.init command h2o tells me that I have installed a 32-Bit Java and that I should install a 64-Bit Java version.
Now that I applied the solution provided in this thread the start of h2o was successful and I'm asking myself why I can't start h2o out of RStudio only.
Is there anything I could modify to make it work ?
Thanks for help.

Erin LeDell

unread,
Mar 15, 2016, 7:28:31 PM3/15/16
to reinhol...@gmail.com, H2O Open Source Scalable Machine Learning - h2ostream, hata...@gmail.com
Hi there,

There are two solutions to fixing this issue.

1) set PATH to have the right path in the environment.

2) uninstall 32-bit java completely.

Best,
Erin
--
Erin LeDell Ph.D.
Statistician & Machine Learning Scientist | H2O.ai

Reinhold Merkle

unread,
Mar 16, 2016, 4:20:49 AM3/16/16
to H2O Open Source Scalable Machine Learning - h2ostream, reinhol...@gmail.com, hata...@gmail.com
To insert the JAVA_HOME user environment variable was finally the solution !

nikpod

unread,
Jul 4, 2018, 2:19:52 AM7/4/18
to H2O Open Source Scalable Machine Learning - h2ostream
@Reinhold Merkle,

Can you expand on this? What environment variable does H2O look for? Which among the two JDKs did you change to JAVA_HOME? What about the other JDK?

Thanks.

rlh...@gmail.com

unread,
Nov 9, 2018, 2:40:49 PM11/9/18
to H2O Open Source Scalable Machine Learning - h2ostream
Try this...

library(h2o)
Sys.setenv(JAVA_HOME = "C:/Program Files/Java/jdk1.8.0_77")
print(Sys.getenv("JAVA_HOME"))
h2o.init()

Lina Yang

unread,
Sep 10, 2020, 10:45:03 PM9/10/20
to H2O Open Source Scalable Machine Learning - h2ostream
problem solved.. thank you so much!

maniteja chinni

unread,
Nov 8, 2022, 10:05:17 PM11/8/22
to H2O Open Source Scalable Machine Learning - h2ostream
it worked thank you

Gustavo Aurélio Faustino

unread,
Nov 17, 2022, 8:23:37 AM11/17/22
to H2O Open Source Scalable Machine Learning - h2ostream

Yes! I was setting the entire path to java.exe file (C:\Program Files\Java\jre1.8.0_351\bin\java.exe), but the path to the directory was enough, like you said! Thanks!
Reply all
Reply to author
Forward
0 new messages