[java] Inexplicable error

Started by
3 comments, last by alaskamatt17 21 years, 8 months ago
I am getting an AccessControlException when I use my game client to load character information from a file saved on the server, which is my computer. I have tried many different ways of putting the same thing in code, but they all give me this exception. Can anyone tell me how to resolve AccessControlExceptions? It might also be useful to note that all info is being sent in a String across a DataOutputStream based on my File''s OutputStream.
Advertisement
"This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.

The reason to deny access can vary. For example, the requested permission might be of an incorrect type, contain an invalid value, or request access that is not allowed according to the security policy. Such information should be given whenever possible at the time the exception is thrown."

Taken from the JDK docs
Manufacturing metaphores in my melancholy mind.
If it''s an applet the ONLY way to get to a file is through http or other network protocol. Anything else will be forbidden by the access controls of java.
I am sending it across to the applet from a server application also written in Java. I don''t really understand how to change it to read in a way that is acceptable to the access controller.
http://java.sun.com/sfaq/

This link has lots of info on applet security.

-TheQSource

This topic is closed to new replies.

Advertisement