title: 7zip command line - Create executable jars
body: <p>I have an executable <code>.jar</code>-File which works, but I want to add some files to the .jar-File with another program. My idea was to use the 7zip command line extension, but when I try to add something to the <code>.jar</code>-File. I use this command:</p>
  
  <p><code>7za.exe a -t7z C:\myfiles\thejar.jar C:\filestoadd\* -r</code></p>
  
  <p>Everytime I try to do this the CMD throws me an error and says:</p>
  
  <p><code>Error: C:\myfiles\thejar.jar is not supported archive</code></p>
  
  <p>Well, ok. Then my Idea was to unpack the file <code>thejar.jar</code>, add the files to the directory where the files from <code>thejar.jar</code> were extracted and create a <code>.zip</code> with the extension <code>.jar</code>. When I did this, the file <code>thejar.jar</code> was about 1MB smaller than before <em>with</em> adding files to it. I tried different compression-methods but it was always smaller. When I tried to execute the <code>.jar</code>, an error-message popped up and said <code>Invalid or corrupt jarfile</code>. I already googled my problem, but I haven't got an answer for now... Can you help me?</p>