What's the best way to add a self-update feature to a Java Swing application?

前端 未结 6 1433
你的背包
你的背包 2020-12-15 09:22

I\'m trying to figure out a way to add a self-update feature to a Java/Swing application I\'m working on.

Basically I\'ve got a bunch of jar files with extra functio

6条回答
  •  隐瞒了意图╮
    2020-12-15 09:30

    I did the exact same thing. But that was long back so there are probably better tools today.

    What I found out I needed was a loader. The loader main program did not have the app jars in classpath. It first downloaded an update if required and then created a custom classloader with the app jars in class path and invoked the main method of the application main class. It is not very complicated. IIRC I needed to do this because the jars could not be overwritten in windows if they were already in classpath.

    Hope this helps.

提交回复
热议问题