title: Error: Could not find or load main class when trying to run jar file
body: <p>I'm trying to create a JAR file of my Java code. There are four classes - <code>A.java</code>, <code>B.java</code>, <code>C.java</code>, and <code>D.java</code>. <code>A.java</code> has the main method. These are in a folder called <code>src</code>, and my manifest file is outside of <code>src</code>, and all of my <code>.class</code> files are in <code>bin</code> which is inside <code>src</code>. I created a <code>MANIFEST.MF</code> with the following contents:</p>
  <pre><code>Manifest-Version: 1.0
  Main-Class: src/A
  </code></pre>
  <p>I then use the command <code>jar cmf MANIFEST.MF A.jar src/bin/*.class src/GraphFile.txt src/ProblemA.txt src/ProblemB.txt</code> (there are a few text files I need to include as well in my JAR file). Then, when I run <code>java -jar A.jar ProblemA.txt GraphFile.txt</code> (note that <code>ProblemA.txt</code> and <code>GraphFile.txt</code> are input files that my program accepts and uses), I get the following error:</p>
  <pre><code>Error: Could not find or load main class src.A
  Caused by: java.lang.ClassNotFoundException: src.A
  </code></pre>
  <p>Can anyone explain what I am doing wrong or any steps I am missing? Unfortunately, I cannot post the actual code because this is for a class project, but I just need to get it compiled into a JAR file for submission! Thanks for any help.</p>