THE CLASSICAL ---> Exception in thread "main" java.lang.NoSuchMethodError: main
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4827060/exception-in-thread-main-java-lang-nosuchmethoderror-main">  Exception in thread &ldquo;main&rdquo; Java.lang.NoSuchMethodError: main ??</a>  </p>
</blockquote>



<pre><code>public class InsertionSort
{
public static void main ( int[] a)
{
    int j;
    for( int p=1 ; p&lt;a.length ; p++)
    {
        int tmp = a[p];
        for( j=p ; j&gt;0 &amp;&amp; tmp&lt;a[j-1] ; j--)
        {
            a[j] = a[j-1];
        }
        a[j] = tmp;
    }
}
}
</code></pre>

<p>And this happens in Terminal. (I'm on a Mac if it matters)
javac InsertionSort.java;java InsertionSort
Exception in thread "main" java.lang.NoSuchMethodError: main</p>
