It is as simple as an application that can update itself. More specific, maybe a launcher that loads a jar file from the web and replaces it with the current jar.
The approach that I want is:
- A launcher which is coded in Java.
- That launcher overall uses classloader e.t.c.
- 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)
I have no clue about classloader or any direction to follow. So my question is "How can i use classloader to create an auto-update Java application?".
P.S. I want java web start to be the last choice. Some lines of code would help me very much.
Edit: I understand completely what are you saying in theory. What i am looking for is specific links or code which i can take as reference. The question isn't a duplicate because i can't find links or code but theory.