Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

Problem storing properties file in vista

Thread view: 
brownk13@gmail.com - 18 May 2007 22:18 GMT
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
Philipp Leitner - 19 May 2007 09:05 GMT
> 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
Brandon McCombs - 19 May 2007 23:22 GMT
> 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?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.