codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  java app auto web update..  sam_02 at 09:53 on Monday, August 06, 2007
 

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?

  Re: java app auto web update..  kanad at 13:09 on Saturday, August 11, 2007
 

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.

  Re: java app auto web update..  sam_02 at 03:01 on Tuesday, August 14, 2007
 

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

  Re: java app auto web update..  kanad at 04:25 on Friday, August 17, 2007
 

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.

  Re: java app auto web update..  sam_02 at 02:54 on Friday, August 24, 2007
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: research the search - hash
•  I want to control Digital Camera or Web Cam through VB
•  Re: Does anyone know to create or implement a diary into Java??
•  Re: Perl Developers Guide
•  Re: Replacing patterns a^b with pow(a,b)
•  Re: java input/output
•  Re: Beanshell web browser
•  Re: dynamic crystal report generation
•  Re: java app auto web update..


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007