File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

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?


Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

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.
I agree. Here's the link:
subject: how to do auto-update for a program
It's not a secret anymore!