Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Java file access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Java file access



Hi everyone,

I'm helping a friend develop a widget that is based on a Java applet (originally a Swing application). The applet reads text files representing game levels, and when this happens we're getting this exception:

java.security.AccessControlException: access denied (java.io.FilePermission Level1.txt read)
at java.security.AccessControlContext.checkPermission (AccessControlContext.java:264)
at java.security.AccessController.checkPermission (AccessController.java:427)
at java.lang.SecurityManager.checkPermission (SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.FileInputStream.<init>(FileInputStream.java:100)
...


Do we need to to set up a policy file as outlined on http:// java.sun.com/docs/books/tutorial/security1.2/tour1/step2.html, or is there an easier way to get around these errors? Also, will this policy file require the user to jump through hoops in order to use the widget?

Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.