Now if we want to add the path for chrome and i.e exe files we have to include those paths in our commands as well.For that we need to do this
java -Dwebdriver.chrome.driver=C:\chromedriver.exe -Dwebdriver.ie.driver=C:\IEDriverServer.exe -jar -Dwebdriver.gecko.driver=C:\geckodriver.exe selenium-server-standalone-3.0.1.jar -role webdriver -hub http://localhost:4444/grid/register -port 5556 -browser browserName=firefox,maxInstances=2 -browser browserName=chrome,maxInstances=3 -browser browserName=iexplore,maxInstances=2 -maxSession 3