• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Preferences on the Mac

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried creating a preferences file using the code below, it works on Windows but not on Mac. Is there something else I need to do, or a different way to accomplish this?

 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the user executing the code doesn't have permission to write on the path used (the whole path) - then it is not possible.

OS X is based on Unix (or is Unix), therefore the right owner/group permissions are needed.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think there should be a permissions problem - a user should be able to access anything in her own userRoot, no?

Or do you mean the actual file "/Users/xyz/Library/Preferences/com.lipay.swreg.plist"? That would be screwed-up file permissions, though.
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:I don't think there should be a permissions problem - a user should be able to access anything in her own userRoot, no?

Or do you mean the actual file "/Users/xyz/Library/Preferences/com.lipay.swreg.plist"? That would be screwed-up file permissions, though.



I think it could be necessary to do a "Repair Disk Permissions" with "Disk Utility"??

I have just tested the code posted, and it works on my Mac.
 
Mike Lipay
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks everyone, I found the problem.

Working between the two platforms I missed changing a \ to a / when I moved it to the Mac. After doing a couple different searches on this forum I finally hit one that covered System.getProperty("file.separator"), our class hasn't covered system properties yet, so I replaced \ everywhere with the file separator constant.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic