dasvinay
asked on
properties.store() fails occassionally
Hi All,
I am not sure why, on some m/cs properties.store() fail to update and store the file. The same code works only on some m/cs. All are windows os. The file is not read-only and there is no other application using it. Only String values are used for keys and values. Any input on occassions where the store() might fail would be greatly appreciated
Thanks
I am not sure why, on some m/cs properties.store() fail to update and store the file. The same code works only on some m/cs. All are windows os. The file is not read-only and there is no other application using it. Only String values are used for keys and values. Any input on occassions where the store() might fail would be greatly appreciated
Thanks
Make sure that the properties-file has not been opened by the same application elsewhere (ensure that you close all streams in finally blocks).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> properties.store() fail to update and store the file
what Error/Exception do you get ?
what Error/Exception do you get ?
ASKER
Thanks for the quick reponse !
Yes, No other application or a service or any instance of the same application are open. The system is rebooted. This is the first action taken ie to update the properties file and it fails..
Thanks
Yes, No other application or a service or any instance of the same application are open. The system is rebooted. This is the first action taken ie to update the properties file and it fails..
Thanks
Do you close the InputStream?
Sorry - didn't see those replies when i posted
ASKER
Good idea, I will synchronize the read/write. this might help.
Thanks everyone
Thanks everyone