Updating library for Jar/Programs

2019-06-22 13:11发布

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.

2条回答
beautiful°
2楼-- · 2019-06-22 13:22

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...

查看更多
做个烂人
3楼-- · 2019-06-22 13:44

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!

查看更多
登录 后发表回答