This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes update pattern? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "update pattern?" Watch "update pattern?" New topic
Author

update pattern?

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: Oct 27, 2005
Posts: 19649
    
  18

Do a search; this question comes around every so often.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: May 03, 2008
Posts: 4523
    
    5

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:


luck, db
There are no new questions, but there may be new answers.
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
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

Joined: Oct 27, 2005
Posts: 19649
    
  18

How about using an FTP protocol instead of HTTP or file? Have you even tried it?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: update pattern?
 
Similar Threads
Create a Windows Desktop Java Application
Building cross-platform double-clickable desktop applications
launching GUI through an icon
Weblogic application server for windows vista operating system
Creating a Jar file under RandomAccesFile usage-A Tantalizing task