Question:
When Execution code:driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities);
prompt "Encountered internal error running command: Error: Command ‘java‘ not found. Is it installed? "
Answer:
Remember to reinstall JAVA jre/jdk, restart your computer as well.