Hi,

I'm have a problem when using Log4j to log from my applet.  When running the 
applet with an unrestricted security access (i.e. the policy file grants all 
access to all folders), there is no problem.  However, when using a policy 
file that restricts access to the directory in which the applet and log4j 
jar files are located, and the directory in which the ouput log file should 
be sent, I get the following error:

java.lang.ExceptionInInitializerError: java.security.AccessControlException: 
access denied (java.io.FilePermission /logfile.log write)

The .java.policy file that I am using contains the following entries:

grant codeBase "file:C:/appletjardir/*" {
permission java.io.FilePermission "C:\\appletjardir", "read, write, delete";
permission java.io.FilePermission "C:\\appletjardir\\-", "read, write, 
delete";
permission java.security.SecurityPermission "getPolicy";
permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "createClassLoader";
permission java.io.FilePermission "C:\\Temp", "read, write, delete";
permission java.io.FilePermission "C:\\Temp\\-", "read, write, delete";
};

Can someone explain why?  I do not know alot about policy files so any help 
would be gratefully received.

Best Regards
SS

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to