title: Java Code Applet Error: java.security.AccessControlException: access denied ("java.io.FilePermission" "MyFile.txt" "read")
body: <p>I got the following error while i was trying to read a file and store it's data into my applet(Java)
  i think that the main error is this :</p>
  
  <pre><code>java.security.AccessControlException: access denied (
       "java.io.FilePermission" "MyFile.txt" "read")
  </code></pre>
  
  <p>And I have no idea how to resolve it, thought it might something to add to my <code>java.policy.applet</code> file which include:</p>
  
  <pre><code>grant {
    permission java.security.AllPermission;
  };
  </code></pre>
  
  <p>I also tried to google it but nothing works.</p>