title: Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system
body: <p>Following previous related issues posted and given resolution, I tired everything but still getting same error for FireFox, Chrome &amp; Internet Explorer.</p>
  
  <pre><code>import org.openqa.selenium.By;
   import org.openqa.selenium.WebDriver;
   import org.openqa.selenium.WebElement;
   import org.openqa.selenium.firefox.FirefoxDriver;
  
  
   public class Search {
  
   public static void main(String[] args) throws InterruptedException {
      WebDriver driver = new FirefoxDriver();
      System.getProperty("webdriver.gecko.driver",
              "C:\\Users\\nitin\\Downloads\\geckodriver-v0.18.0-
    win64\\geckodriver.exe");
      driver.get("http://www.wikipedia.org");
      WebElement link;
      link = driver.findElement(By.linkText("English"));
      link.click();
      Thread.sleep(5000);
      WebElement searchbox;
      searchbox = driver.findElement(By.id("searchInput"));
      searchbox.sendKeys("Software");
      searchbox.submit();
      Thread.sleep(5000);
      driver.quit();
  </code></pre>