title: Couldn't find main class error is coming while running java in eclipse
body: <p>I'm running Java program in Eclipse and I'm calling one class from another class. if I run the class that contains the <code>main</code> method it gives an error like:</p>
  
  <pre><code>could not find main class. program wil exit
  </code></pre>
  
  <p>A sample code is:</p>
  
  <pre><code>public static void main(String[] args)
      {
          Test t1=suitToRun();
      TestRunner.run(t1);
  
  }
  public static Test suitToRun()
  {
      TestSuite suite= new TestSuite();
      suite.addTestSuite(Login.class);
      return suite;
  }
  </code></pre>