Updating library for Jar/Programs

爱⌒轻易说出口 提交于 2019-12-10 14:46:48

问题


I'm looking for an update library for the software I am developing. It's a small software, but I'd like to imbue it with some nice features. One of those is auto-update. I've developed 2 class library to do this job for me, but I'd like a more robust library, becuase it's missing some features. Between the features the library could have, these could be in it:

  • Generate a difference file based on the old version (jar for example). Given the current version of the jar, and the new jar file, generate a new jar that will be downloaded by the clients, puting only the files that were changed since the last update.
  • Check some kind of checksum. Each file inside the JAR have it's own checksum, or the whole jar having a checksum.
  • Generate those checksum. If possible, while attending to the first item. File by file, or jar by jar, given the new files.
  • It would be nice if it could deal also if the input is a folder or a jar.
  • Merge the current jar with the downloaded one.

P.S.: I'm not writing a web-based (that runs in a browser) application.

Thanks for the attention.


回答1:


Found the perfect solution for my needs in this answer: java web start alternative

Please take a look at this software https://code.google.com/p/getdown/ It claims it can be GCJ and be used to update also non-Java applications. But this does fills my expectations!




回答2:


There are many possible ways of doing that. In fact, you already pointed what you need. While developing such a solution isn't a big deal, there are also many libraries and products that already do that.

Some examples are already stated in similar questions, like:

Autoupdate Feature in a Java Swing Desktop App

or

Design of auto-updating software

One example, out of a simple google web search is Autoupdate+ One thing to remember is that the install/update software doesn't necessarily need to be written in Java itself...



来源:https://stackoverflow.com/questions/11194905/updating-library-for-jar-programs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!