How can I write a Java application that can update itself at runtime?
问题 I would like to implement a java application (server application) that can download a new version (.jar file) from a given url, and then update itself at runtime. What is the best way to do this and is it possible? I guess that the application can download a new .jar file and start it. But how should I do the handover, e.g. know when the new application is started and then exit. Or is there a better way to do this? 回答1: The basic structure of a solution is as follows: There is a main loop