Couldn't find main class error is coming while running java in eclipse
<p>I'm running java program in eclipse and I'm calling one class from another class.. if I run class contains main method it gave an error like:</p>

<blockquote>
  <p>could not find main class. program wil exit</p>
</blockquote>

<p>please tell me what is happening.</p>

<p>A sample code is here :</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>
