my dog learned polymorphism*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 39478
    
  28
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Preferences not being set on windows 7