title: How to run a JAR file
body: <p>I created a JAR file like this:</p>
  
  <pre><code>jar cf Predit.jar *.*
  </code></pre>
  
  <p>I ran this JAR file by double clicking on it (it didn't work). So I ran it from the DOS prompt like this:</p>
  
  <pre><code>java -jar Predit.jar
  </code></pre>
  
  <p>It raised "Failed to load main class" exceptions. So I extracted this JAR file:</p>
  
  <pre><code>jar -xf Predit.jar
  </code></pre>
  
  <p>and I ran the class file:</p>
  
  <pre><code>java Predit
  </code></pre>
  
  <p>It worked well. I do not know why the JAR file did not work. Please tell me the steps to run the JAR file</p>