title: Unable to start Internet Explorer or Chrome in Selenium Webdriver (JAVA)
body: <p>I am trying to start up an IE instance using Webdriver.  I can't figure out why I'm receiving these errors, my code appears to be identical to every example I can find on the web.<br>
  I'm using Java and testng.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import java.io.File;
  import org.openqa.selenium.ie.InternetExplorerDriver;
  import org.openqa.selenium.WebDriver;
  
  public class Tests {
  
      File file = new File("C:\\selenium\\IEDriverServer.exe");
      System.setProperty("webdriver.ie.driver", file.getAbsolutePath() );  
      WebDriver driver = new InternetExplorerDriver();
  }
  </code></pre>
  
  <p>The following errors are displaying, all of these errors are on the "System.setProperty" line.</p>
  
  <p>Multiple markers at this line
      - Syntax error on token ""webdriver.ie.driver"", invalid 
       FormalParameterList
      - Syntax error on token(s), misplaced construct(s)
      - Syntax error on tokens, FormalParameter expected instead</p>
  
  <p>Please note that I have the exact same problem if I try to use Chrome with this code:</p>
  
  <pre><code>File file = new File("C:/selenium/chromedriver.exe");
  System.setProperty("webdriver.chrome.driver", file.getAbsolutePath());
  WebDriver driver = new ChromeDriver();
  </code></pre>