“PATH to JAVA not found. Please check JAVA is installed.” error when initialising RSelenium

断了今生、忘了曾经 提交于 2021-01-03 07:27:04

问题


I am trying to start an RSelenium session to webscrape. However, when running this code:

driver <- rsDriver(browser=c("chrome"), chromever="76.0.3809.126", port = 4444L)

I get this error: Error in java_check() : PATH to JAVA not found. Please check JAVA is installed.

I have installed the right version of Java - I think I somehow need to set the path to Java in R, but I've got no idea how to do this. I'm a data scientist and don't understand how any of the computer stuff works.

I also tried to install Docker to fix this following this tutorial:

https://callumgwtaylor.github.io/blog/2018/02/01/using-rselenium-and-docker-to-webscrape-in-r-using-the-who-snake-database/

but when running this code in the terminal as requested I get:'docker' is not recognized as an internal or external command, operable program or batch file.

Is there anyone who can help?

Thanks


回答1:


Alternatively, you can run the binary manually. Open a console in your OS and navigate to where the binary is located and run:

java -jar selenium-server-standalone-x.xx.x.jar



来源:https://stackoverflow.com/questions/57852560/path-to-java-not-found-please-check-java-is-installed-error-when-initialisin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!