• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

automatically updating application

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I'm developing application that has to automatically update.
Now it works as a windows service (using prunsrv http://commons.apache.org/daemon/procrun.html )
I'm wondering if you have any ideas that will help

the plan is much about:
1. application downloads update package
2. application runs update package and ends itself
3. update package do update (java classes or maybe a script ? )
4. update package ends and starts application (starts windows service)

using java during update is easy/comfortable ? or maybe some kind of scripts? BeanShell? (i don't want to learn a new scripting language - i don't have a time for this )
are there any advantages of using scripting languages? (over plain java)
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jack Donahey wrote:I'm developing application that has to automatically update.


I'm afraid that covers a multitude of sins. If it's for a desktop system, the easiest is to just wrap the jar in an installer (there are plenty out there), have a notification system for new releases or bug-fixes, and let the user do it themselves.

I'm certainly no expert on this, but I suspect that true real-time auto-updating might be a very tricky business, so before you embark on such a project, I'd ask yourself whether you really need it .

Winston
 
Jack Donahey
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well...thanks for help

it was quite easy.
downloading package (zip), unpacking, setting up variables for package (like paths), launching updater
updater move/copy/delete files, makes backup, updates properties and launches application (windows service) at the end
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jack Donahey wrote:it was quite easy.
downloading package (zip), unpacking, setting up variables for package (like paths), launching updater
updater move/copy/delete files, makes backup, updates properties and launches application (windows service) at the end


So, basically a manual update...yes?

Winston
 
Jack Donahey
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no, fully automatic.

application checks for update, downloads package, unpacks itp and then launches it.
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jack Donahey wrote:application checks for update, downloads package, unpacks itp and then launches it.


And presumably it then also takes care of any existing running threads. So, does it:
(a) restart them all?
(b) inform the app that it has "refreshed" - in which case what does the app itself do?
My assumption is that any thread that has been "refreshed" could be running with a stale version of an existing class; although how critical that is may well depend on the type of update.

Winston
 
Jack Donahey
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
application runs update package in a new JVM
new JVM stops windows service (the application), updates files and then starts windows service (the application)
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic