|
i always paid more attention to programming and never as much attention to how i would distribute by application bundle to others.. i just used to create a excutable jar file, since it was easy to run my app from it and could always re-distribute a newer version if one were to come out.. but now i want to rid myself of this approach..
Instead i plan on making use of http://www.ej-technologies.com/products/install4j/overview.html, quite powerful with all the extra features..
but I still have the problem of making the auto web update, so every time i make a change, I could just upload it to a web server and lay back..
I dont really know how this would be.. but I figure should be something like this:
- Open the app, a running thread opens a web connection to the web server..
- Reads a config file on the server, checks the version of the config file with the version of the app.
- If needed to update, download the appropriate file from the server..
- Then i'm a bit lost..
Also, I've seen some updaters that help if you are using a proxy..
There seems to be no clear examples of this that I can find...
Any help?
|
|
|
Well, why not start a new 'process' ? As per my suggestion update process should be independent of main system.
Create one folder where all updates are stored. Put that folder in classpath.
If user updates from the main system then obviously user should restart the system. Or using classloader check if you can load all the classes or jar.
You can use URLConnection's inputstream to download file.
You can keep version file at both client and server side to check.
I don't know what you are upgrading actually.
|
|
|
I thought of the creating a service process and running it independent of my application.. but I never tried such a method..
I thought it would be easiler to just run the check every time the application was launched.. if a new version is available, then the user is prompted to download and install the new update..
A very simple example, for example I make changes to a jar library that is linked with my application.. I download that new jar file, and replace it with the old one..
I cannot seem to find any examples online that help with this..
|
|
|
1) If you are replacing old jar with new one please make a copy of old jar in temp folder.
2) Also download new jar in temp folder.
3) When you are replacing old jar with new one if replacing fails then show "upgradation error" and again replace back old jar.
4) Also if system is not behaving properly or having compatibility issue. Always Keep rescue wizard which will simply copy older jar.
5) Once copying is completed replace jar. Ask user to restart system. If user says yes then close system
Now this is what my suggestion. Please check if it is useful and matches your requirement.
|
|
|
thanks kanad, i think i get most of the concept of this.. but still hoping there was some kind of a framework library i could use to reduce the development time..
oh well.. if any links, let me know..
|
|
|
|
|
|
|
// |