Below is my code:

```
package mypackage;
import java.io.File;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class myclass {
public static WebDriver driver;
public static File file;
public static void main (String[] args){

// declaration and instantiation of objects/variables
file = new File("C:\\DATA\\IEDriverServer_x64_2.42.0\\IEDriverServer.exe");
System.setProperty("webdriver.ie.driver", file.getAbsolutePath());  
driver = new InternetExplorerDriver();
String baseURL = "http://www.google.com";
String expectedTitle = "Google";        
String actualTitle = "";

// launch IE and direct it to the Base URL        
driver.get(baseURL);         

// get the actual value of the title        
actualTitle = driver.getTitle();        
/*         
* compare the actual title of the page witht the expected one and print         
* the result as "Passed" or "Failed"         
*/       
if (actualTitle.contentEquals(expectedTitle)){            
System.out.println("Test Passed!");        
} else {            
System.out.println("Test Failed");        
}    

//close Firefox        
driver.close();                

// exit the program explicitly        
System.exit(0);

}
}

```

When I run this I get the following exception.

```
    Started InternetExplorerDriver server (64-bit)
2.42.0.0
Listening on port 42229
Exception in thread "main" java.lang.NullPointerException
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:226)
        at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:182)
        at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
        at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:146)
        at mypackage.myclass.main(myclass.java:15)

```