Autoupdate feature in a Java Swing desktop App

后端 未结 1 1890
深忆病人
深忆病人 2020-12-30 10:50

I\'ve developed a desktop Swing app and I\'m thinking about the best way to provide the autoupdate feature. I know that JavaWebStart provides this but I think that It doesn

相关标签:
1条回答
  • 2020-12-30 11:02

    We did a similar thing. We just got it via https and downloaded the jar. To know if you need a new one we just check the size on the stream. Theoretically that may not work, but in practice it did. We got even fancier by getting the directory listing where the jars were located, parsing it and downloading each jar, so the name of the jar wasn't hard coded either. There are a couple of ugly points, though.

    First was launching a new jvm process to start the new jar is a not so simple.

    Second, you have to be sure you don't corrupt your jar if your update fails in the middle.

    Finally, there is no way to update the bootstraping jar with this process.

    0 讨论(0)
提交回复
热议问题