title: Assigning a version to a jar file
body: <p>Simple issue: I'd like to assign a new version\build number every time I issue a new jar file to my customers.</p>
  
  <p>I understood that a manufest file is involved but I fail to get the version whatever I have tried so far.</p>
  
  <p>My jar project has two packages under a common "com" package: "main" and "loginRequest".</p>
  
  <p>My main class ("Main") is under the "main" package.</p>
  
  <p>My manifest file is :</p>
  
  <pre><code>Manifest-Version: 1.0
  Main-Class: main.Main
  Specification-Version: 1.1
  </code></pre>
  
  <p>I tried to build the jar using eclipse (excluding the src files), including the manifest.</p>
  
  <p>I also tried the following:</p>
  
  <pre><code>jar -cvfm v11_4_WebExClientEE.jar ..\..\v11_4_WebExClientEE.mf main\Main.class 
  </code></pre>
  
  <p>which retruned me </p>
  
  <pre><code>"added manifest
  
   adding: main/Main.class(in = 1206) (out= 677)(deflated 43%)"
  </code></pre>
  
  <p>and then: </p>
  
  <pre><code>java -jar v11_4_WebExClientEE.jar
  </code></pre>
  
  <p>which returned me </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: main/Main (wrong name: com/main/Main)
  </code></pre>
  
  <p>etc.</p>
  
  <p>In my main class ctor I added:</p>
  
  <pre><code>    Package p = this.getClass().getPackage();
  
      System.out.println("v11_4_WebExClientEE spec Version : " + p.getSpecificationVersion());
  </code></pre>
  
  <p>Can you please advise?</p>
  
  <p>Thanks!</p>