This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes General Computing and the fly likes Preferences not being set on windows 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Preferences not being set on windows 7" Watch "Preferences not being set on windows 7" New topic
Author

Preferences not being set on windows 7

Adam Cripps
Ranch Hand

Joined: Oct 01, 2011
Posts: 41

I have a simple application that I wrote to help me write reports. Recently at work I have been given a windows 7 machine. My application ran fine under windows xp but under windows 7 it fails to set preferences when the application closes.

I'm using these snippets of code to read and write preferences:



then later on...



to check if it has already been set and then take the necessary action if it is (read in and write).

The on exit, I write with this:



When I run the application, there is nothing on the command line that reports that there is a problem writing the preferences file (I was thinking there might be a permissions problem). Is this a known thing with Windows 7? What else can I do to debug the application? As I said earlier, my code is fine on linux/windows xp machines - it just seems to be this windows 7 setup.

TIA
Adam
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

I too use Windows 7. Can you show me the whole code? I would like to debug and see what does it do.


~ Mansukh
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
Moving discssion as too difficult for “beginning”.
Adam Cripps
Ranch Hand

Joined: Oct 01, 2011
Posts: 41

Mansukhdeep Thind wrote:I too use Windows 7. Can you show me the whole code? I would like to debug and see what does it do.


PM coming your way. Although I thought I would debug it, but nothing really shows up on the console about any errors setting preferences.
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

No need fro a PM Adam. You can share anything here as long as it is legal.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Preferences not being set on windows 7
 
Similar Threads
Debugging: File deletion failed
Add application to start up
Preferences.removeNode() doesn't actually remove the preference node
Hot Spot JVM Crashes Urgent pls help
Saving a filename in Preferences