File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

update pattern?

 
olze oli
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i'd like to create a update function in my application.
The problem is windows... in not-windows environments i can easily replace the original .jar file but windows somehow locks the application if its already running, so i cannot overwrite it with the new version.
Does anyone here have a good idea how i could achieve this?
Is there a design pattern for updating applications?
When i create another jar which calls the application (and before that, checks if the version is correct) i must pass the information string to the update jar, but how can i get this when the version string is in a completly other project (jar)?
 
Rob Spoor
Sheriff
Pie
Posts: 20396
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a search; this question comes around every so often.
 
olze oli
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and what should i use as search term?
dont say "update" :/

edit: i cant use webstart because i dont have (and dont want) a http server
 
Darryl Burke
Bartender
Posts: 5116
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
olze oli wrote:edit: i cant use webstart because i dont have (and dont want) a http server

Yes you can. Use the file protocol, not the http protocol.

Here's an example jnlp that accesses the jaf form the local filesystem:
 
olze oli
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but when someone downloads the application (its hosted on a ftp server) and the codebase is a local file, how should it be accessed from another pc?
 
Rob Spoor
Sheriff
Pie
Posts: 20396
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using an FTP protocol instead of HTTP or file? Have you even tried it?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic