title: How to compile and run Java code with multiple packages or source files
body: <p>I've been teaching myself Java, but I have only used Eclipse as a method of compiling and running my project, and would like to see how I would compile and run the following file structure using only the command line (Don't want to simply export a <code>.jar</code> file from eclipse).</p>
  
  <p>The file structure is as follows:</p>
  
  <pre><code>src/
      model/
          file1.java
          file2.java
      app/
          main.java (contains main method)
          file3.java
          images/
              1.gif
              2.gif
      view/
          file4.java
          file5.java
  </code></pre>
  
  <p>I need the image files compiled in as well, as I used them for a couple of things. I understand the <code>javac</code> command should be used to build the <code>.class</code> files, but I am confused as to who I would compile it (and run) with this file structure (and with the image files). Any help would be appreciated.</p>
  
  <p>Note: I am attempting to compile and run on Ubuntu 12.04 and am strictly trying to use command line.</p>