问题
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