Anybody seen anything like this...
I am not able to store changes to a properties file in Vista.
properties is an instance of java.util.Properties
properties.store(new FileOutputStream('Path to file'), "Client Data");
Calling this will not throw an error it looks like it works, but
nothing is saved. We have this same code dealing with other
properties files, and they work just fine. Plus this works fine in
XP.
Just wondering if anybody has any ideas.
Thanks
> Calling this will not throw an error it looks like it works, but
> nothing is saved. We have this same code dealing with other
> properties files, and they work just fine. Plus this works fine in
> XP.
Where to you want to save this? Vista brings a new Security model
which basically disallows applications to write into their own
Applications directory*. I am not actually a Windows expert, but I
think if you relocate your properties file into e.g. $HOME/myApp/
properties.props should work just fine.
/philipp
* AFAIK you are getting no error since the write operation is
basically redirected to some other place, like a "virtual application
folder".
Karl Uppiano - 19 May 2007 23:33 GMT
> * AFAIK you are getting no error since the write operation is
> basically redirected to some other place, like a "virtual application
> folder".
In which case, a closed system that saves and retrieves its own properties
would still work, even if the file was saved to the virtual application
folder, right?
Philipp Leitner - 20 May 2007 10:00 GMT
> > * AFAIK you are getting no error since the write operation is
> > basically redirected to some other place, like a "virtual application
[quoted text clipped - 3 lines]
> would still work, even if the file was saved to the virtual application
> folder, right?
True. I didn't claim to have a sure as hell answer for the question of
the OP, but it is a good guess of what might be causing the problems
on Vista only.
/philipp
> Anybody seen anything like this...
>
[quoted text clipped - 12 lines]
>
> Thanks
Have you checked the Windows security event log in case something was
logged by the OS?