Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating library for Jar/Programs

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.

like image 642
SHiRKiT Avatar asked Jun 25 '12 18:06

SHiRKiT


People also ask

How do you update a JAR file?

The Jar tool provides a u option which you can use to update the contents of an existing JAR file by modifying its manifest or by adding files. In this command: The u option indicates that you want to update an existing JAR file. The f option indicates that the JAR file to update is specified on the command line.

What is the difference between JAR and library?

A JAR serves the same function an an Assembly in the C#/. net world. It's a collection of java classes, a manifest, and optionally other resources, such as properties files. A library is a more abstract concept, in java, a library is usually packaged as a JAR (Java ARchive), or a collection of JARs.

What are JAR libraries?

A Java Archive, or JAR file, contains all of the various components that make up a self-contained, executable Java application, deployable Java applet or, most commonly, a Java library to which any Java Runtime Environment can link.


2 Answers

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!

like image 122
SHiRKiT Avatar answered Oct 06 '22 18:10

SHiRKiT


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

like image 29
Filipe Fedalto Avatar answered Oct 06 '22 18:10

Filipe Fedalto