Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception: java.io.UnixFileSystem.createFileExclusively(Native Method)



On 5/2/06, Mohsan Khan <email@hidden> wrote:

This will create the prefs file in the same dir as the app, does this mean
the dir was locked or some permission issue?

It is not normal for a Mac application to save its preference next to the application itself (see [1]). On Mac OS X a user may be able to run an application but not have write access to the directory contains the application (often /Applications).

If you use Java's preferences API it should do the right thing for you
(use the user's preferences directory).

-Shawn

[1] <http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/LibraryDirectory.html>,
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/UserPreferences.html>
and <http://developer.apple.com/documentation/Java/Reference/1.4.2/appledoc/api/com/apple/eio/FileManager.html#findFolder(short,%20int,%20boolean)>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Exception: java.io.UnixFileSystem.createFileExclusively(Native Method) (From: Mohsan Khan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.