title: How create a Java application that auto-updates itself?
body: <p>It is as simple as an application that can update itself.
  More specific, maybe a launcher that loads a <strong>jar</strong> file from the web and replaces it with the current jar.</p>
  
  <p>The approach that I want is:</p>
  
  <ul>
  <li>A launcher which is coded in Java.</li>
  <li>That launcher overall uses classloader e.t.c.</li>
  <li>I want to keep the data from the previous jar. Maybe the data from the previous jar are written on a .txt file and pass them to the new one? (If possible)</li>
  </ul>
  
  <p>I have no clue about classloader or any direction to follow.
  So my question is "<strong>How can i use classloader to create an auto-update Java application?</strong>".</p>
  
  <p><em>P.S. I want java web start to be the last choice. Some lines of code would help me very much.</em></p>
  
  <p><strong>Edit:</strong> I understand completely what are you saying in theory. What i am looking for is specific <strong>links</strong> or <strong>code</strong> which i can take as <strong>reference</strong>. 
  The question isn't a duplicate because i can't find links or code but theory.</p>