title: How to write log file for applet application?
body: <p>I am getting an exception while I am trying to write a log using <code>log4j</code>.</p>
  
  <p>Here is the exception that is thrown:</p>
  
  <pre><code>java.security.AccessControlException: access denied ("java.io.FilePermission" "D:\appletServer\bqapplet.log" "write")
       at java.security.AccessControlContext.checkPermission(Unknown Source)
       at java.security.AccessController.checkPermission(Unknown Source)
       at java.lang.SecurityManager.checkPermission(Unknown Source)
       at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
       at java.lang.SecurityManager.checkWrite(Unknown Source)
       at java.io.FileOutputStream.&lt;init&gt;(Unknown Source)
       at java.io.FileOutputStream.&lt;init&gt;(Unknown Source)
       at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
       at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
       at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
       at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
       at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
       at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
       at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
       at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
       at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
       at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
       at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
       at com.bqurious.applet.CommandExecutor.&lt;init&gt;(CommandExecutor.java:41)
       at com.bqurious.applet.BqAppletMainAppender.waitForConnections(BqAppletMainAppender.java:604)
       at com.bqurious.applet.BqAppletMainAppender.run(BqAppletMainAppender.java:195)
       at java.lang.Thread.run(Unknown Source)
    Error! - java.security.AccessControlException: access denied ("java.io.FilePermission" "D:\appletServer\bqapplet.log" "write")
  </code></pre>