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)



The native method is just trying to do open() with O_RDWR | O_CREAT | O_EXCL. If this fails, it'll throw an IOException.

If you are getting an IOException, my guess is that you don't have permission to create that file.

--viktor

On May 2, 2006, at 10:33 AM, Michael Hall wrote:


On May 2, 2006, at 12:02 PM, Mohsan Khan wrote:


Now I recently received this exception, which I really don't understand since I've never seen it before and its also native.

The final method is native, but that just means java.io.File includes some native methods. 

java.io.UnixFileSystem.createFileExclusively(Native Method)

You've omitted the actual exception?



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

Definitely seems one possibility. Catching the exception and re-throwing including user.dir might be useful. Do you know what path you use for the preferences file? Why not use the preferences API? 
You could try moving the application to a protected dir and see if the same error results. 



 _______________________________________________
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>)
 >Re: Exception: java.io.UnixFileSystem.createFileExclusively(Native Method) (From: Michael Hall <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.