title: NoSuchMethodError when running jar
body: <p>I've made a small application in Java, which runs fine in Intellij Idea, however once I try to export it to a jar file and try to run it, it gives me this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: nu.apiary.PF2.Building.&lt;init&gt;(ILjava/lang/String;III)V
          at nu.apiary.RMS.Main.main(Main.java:13)
  </code></pre>
  
  <p>All of my dependencies are included in the jar file (I've checked with WinRar)...</p>
  
  <p>The error occurs in this method:</p>
  
  <pre><code>public static void main(String[] args) {
      try {
          building = new Building(Integer.parseInt(args[0]), args[1], 0, 0, 0);
      } catch (Exception e) {
          System.err.println("Incorrect building name entered!");
          System.err.println("Closing now!");
          System.exit(-1);
      }
      if(args.length == 2)
          server = new Server(8998);
      else if(args.length == 3)
          server = new Server(Integer.parseInt(args[2]));
      else if(args.length &lt; 2 || args.length &gt; 3) {
          System.err.println("Incorrect amount of arguments, correct usage:");
          System.err.println("rms-[version] &lt;height&gt; &lt;name&gt; [port]");
          System.err.println("Closing now!");
          System.exit(-1);
      }
      serverThread = new Thread(server);
      serverThread.start();
  }
  </code></pre>
  
  <p>At this line: </p>
  
  <pre><code>building = new Building(Integer.parseInt(args[0]), args[1], 0, 0, 0);
  </code></pre>
  
  <p>I run it with this command: </p>
  
  <pre><code>java -jar rms.jar 1 data/home#
  </code></pre>