It's not a secret anymore!*
The moose likes Java in General and the fly likes how to do auto-update for a program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to do auto-update for a program" Watch "how to do auto-update for a program" New topic
Author

how to do auto-update for a program

reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
I have Java based program installed in my PC under normal path: C:\Program Files\MyProgram\ and there are some jar files under C:\Program Files\MyProgram\lib\

Now I want to update the program by replacing some jar files under lib folder. How can I write Java code to check where a user has installed this program? Say if it's not in C driver. Or even if it's not Window's based?

I know Firefox, iTunes, ... can do update checking and install automatically if there is more recent vision of software. But how can we implement it in Java?

Thanks


SCJA, SCJP5.0, SCBCD, SCWCD
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Most Windows based programs will have their install location stored in the registry or as an environment variable. I guess as an alternative you could use Java to search for a particular file name across the computer, but that could be an expensive operation.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
Don't get me started about those stupid light bulbs.
 
subject: how to do auto-update for a program
 
Similar Threads
How to execute jar file from another directory
Upgrade wsad with java 1.5
Package at multiple locations
package javax.ejb does not exist
file argument to java program on the command line