Problem storing properties file in vista

B

brownk13

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
 
P

Philipp Leitner

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".
 
B

Brandon McCombs

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

Have you checked the Windows security event log in case something was
logged by the OS?
 
K

Karl Uppiano

Philipp Leitner said:
* 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?
 
P

Philipp Leitner

* AFAIK you are getting no error since the write operation is
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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top