The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Your current working directory is the directory you are in when you start your application. This may not be the same directory as where the application resides.
Having the properties file in the current working directory instead of being with the jar file could be quite logical - it means that parameters that are stored per client can be accomodated.
For example, if you stored the size and placement of the window in the properties file, then the next time the user runs your application they will get the same screen placement they had last time - which is a nice feature. But you would not want that stored in a common properties file, otherwise you could get some other user's prefered screen size and placement.
Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
Andrew: Having the properties file in the current working directory instead of being with the jar file could be quite logical - it means that parameters that are stored per client can be accomodated.
For example, if you stored the size and placement of the window in the properties file, then the next time the user runs your application they will get the same screen placement they had last time - which is a nice feature. But you would not want that stored in a common properties file, otherwise you could get some other user's prefered screen size and placement.
Philippe: Normally, clients will run on different machines, right ? So I don't see the issue there.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
Not to beat a dead horse, but I've read most of the threads on where to put suncertify.properties and I still am not even close to being sure about what I should do.
OK, so I could create the properties file in the current directory and then copy it to somewhere in the application. Then, when the app is launched from a different directory I could copy the app's version to the new current directory. The only problem is that I then have to come up with some sort of conflict resolution for when different users set different settings. Aaargh! It's all seemingly so simple and yet so maddening...
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|