This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
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.