title: Replace a single file from jar file
body: <p>I need to replace a single class file from a jar file. The jar file is quite big and every time I don't want to extract it and replace manually.  I want to automate this procedure. Can someone please help me on this. 
  When jar file is extracted below folders are created :</p>
  
  <ol>
  <li>render</li>
  <li>classes</li>
  <li>com</li>
  </ol>
  
  <p>I need to go  inside "com/cgp/f1/cmmi/" folder and replace a class file inside it. </p>
  
  <p>Things I tried : </p>
  
  <ol>
  <li><code>zip file.jar com/cgp/f1/cmmi/services.class Services.class</code></li>
  <li><code>jar uf  file.jar com/cgp/f1/cmmi/ services.class<br>
  jar -uf  file.jar com\cgp\f1\cmmi\ services.class<br>
  jar uf  file.jar com/cgp/f1/cmmi/services.class services.class</code></li>
  </ol>
  
  <p>The error I am getting is  :</p>
  
  <blockquote>
    <p>when using jar command<br>
    com\cgp\f1\cmmi\  : no such file or directory</p>
    
    <p>when using zip command :<br>
    zip warning: name not matched: com\cgp\f1\cmmi\Services.class</p>
  </blockquote>
  
  <p>can some one please guide me where I am going wrong.</p>