title: Build Jar File with multiple classes
body: <p>Is there a way to build a jar file that is anything inside a specific folder?</p>
  
  <p>Inside my folder I have my main class named "GamesCombined.java" with it's .class files</p>
  
  <p>Here's what my directory looks like inside GamesCombined folder</p>
  
  <pre><code>-&gt; GamesCombined.java
  -&gt; GamesCombined.class //classes*
  -&gt; games (folder)
  |
  |----&gt; pacman (folder)
  |   |
  |   |----&gt; PacmanGame.java
  |   |----&gt; PacmanGame.class //classes*
  |
  |----&gt; racinggame(folder)
       |
       |----&gt; RacingGame.java
       |----&gt; RacingGame.class //classes*
  -&gt; images (folder)
  |
  |----&gt; pacman (folder)
  |    |
  |    |----&gt; //jpg's and png's
  |
  |----&gt; racinggame (folder)
       |
       |----&gt; //jpg's and png's
  </code></pre>
  
  <p>I already made a jar file of the GamesCombined.java by following this link:
  <a href="http://www.skylit.com/javamethods/faqs/createjar.html" rel="nofollow">http://www.skylit.com/javamethods/faqs/createjar.html</a></p>
  
  <p>But then it has an error:</p>
  
  <p>Exception in thread "main" java.lang.NoClassDefFoundError: games/pacman/PacmanGame (wrong name: PacmanGame)</p>
  
  <p>GamesCombined.java has import games.pacman.*;</p>
  
  <p>Is there a way where I could just build a jar file including the other classes? What should I do? :o</p>
  
  <p>I'm new when it comes on JAR files. :/</p>