title: Error: Main method not found in class, please define the main method as:public static void main(String[] args)
body: <p>As my question is old but am new eclipse am not able to solve the error.
  can someone help in solving this.</p>
  
  <pre><code>public class Anita {
  
    public static void main(String[] args) {
  
         WebDriver driver = new FirefoxDriver();
         driver.manage().window().maximize();
         driver.get("https://www.hdfc.com/");
         WebElement Housing = driver.findElement(By.linkText("Housing Loans"));
         Actions myActions = new Actions(driver);
         myActions.moveToElement(Housing);
  
      }
  
  }
  </code></pre>
  
  <p>When I execute above code, I got this error.</p>
  
  <blockquote>
    <p>Main method not found in class, please define the main method
    as:public static void main(String[] args) or a JavaFX application
    class must extend javafx.application.Application</p>
  </blockquote>
  
  <p>and why I need to extend javafx appilcation? <br>
  Thanks in advance.</p>