title: How to patch a Java program?
body: <p>Recently I applied a fix to a Java desktop application. I did this by changing the code in one of my classes, compiled it and sent the new jar to the production environment. </p>
  
  <p>I'm now asked if it is possible to just patch the jar in production by just copying the compiled class that I fixed, or even create a patching program/script that will be able to update just the modified files.</p>
  
  <p>Additional info:</p>
  
  <ol>
  <li>The patch does not have to be applied in run time. Meaning the patch can be done as a separate program or activity. My old program does not need to auto update itself.</li>
  <li>Can this be done with web applications  (WAR file) too?</li>
  </ol>
  
  <p>The best answer I came up is this, but it's 2 years old.
  <a href="https://stackoverflow.com/questions/3738523/patching-java-software">Patching Java software</a></p>
  
  <p>Is my requirement rare? I have never seen a tutorial to patch a Java application.</p>