How to resolve main class not found exception while creating jar?
<p>I am creating an executable jar file of a java project.
I successfully created a sample jar file with Hello world class.
I used following  commands to create a jar:</p>

<pre><code> trail&gt; javac -classpath "c:\Program Files\Java\jdk1.6.0_01\bin;" MyClass.java

 bin&gt; jar cvfm MyJar.jar manifest.mf trail\*.class
</code></pre>

<p>The Contents of my manifest.mf are</p>

<pre><code>  Manifest-Version: 1.0
  Created-By: 1.5.0_03 (Sun Microsystems Inc.)
  Main-Class: trial.MyClass
</code></pre>

<p>This works fine.</p>

<p>Now when I use same procedure to create the jar of my project,
I am getting mainClass not found error.</p>

<pre><code>EDIT
My project need 2 third party jar.
So I have compiled  My project by adding this jars in classpath.
I guess the problem is related with this jar file dependencies. 
Can anybody help me to solve this problem?
</code></pre>
