Skip to main content
gamedev.net
🔒 Locked

[java] Inexplicable error

Started by alaskamatt17 3 replies 900+ views
Original Post
alaskamatt17
alaskamatt17
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.
Vikato
Vikato
"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.
snowmoon
snowmoon
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.
alaskamatt17
alaskamatt17
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.
TheQSource
TheQSource
http://java.sun.com/sfaq/

This link has lots of info on applet security.

-TheQSource

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.