I have this exception since I upgraded to 3.0 beta with Firefox.
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property
It seems now we need to manually download and set path to the driver executable for Mozilla Firefox also just like chromedriver.
Following is what you need to do:-
Now you need to set system property and write following lines to initialize FireFoxDriver object:-
System.setProperty("webdriver.gecko.driver", "C:\GeckoDriver\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://seleniumhq.com");
Thats it!