Below is the code to open Gmail using selenium java code:
import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.firefox.*;
public class TestDemo {
    public void GmailACC()
    {
        WebDriver webdriver = new FirefoxDriver();
        webdriver.get("gmail URL");
    }
    public static void main(String[] args) {
        TestDemo obj = new TestDemo();
        obj.GmailACC();
    }
}
When I run the above code, Firefox opens but it does not open the Gmail page. Any suggestions??