title: How to let an applet read any file on the client? (creating an uploader)
body: <p>I am writing a Java file uploader applet, but I simply could not figure the following issue out. (The uploader is very specialised, therefore we could not just use a stock solution). I have a self-signed applet, which I am trying to test locally, but I cannot get it to read local files. I have Permissions:all-permissions declared in the manifest.</p>
  <p>If I add</p>
  <pre><code>&lt;param name=&quot;permissions&quot; value=&quot;all-permissions&quot; /&gt;
  </code></pre>
  <p>to the applet tag , it throws</p>
  <pre><code>com.sun.deploy.security.BlockedException: User has denied the privileges to the code
  </code></pre>
  <p>If I avoid this, it throws</p>
  <pre><code>java.security.AccessControlException: access denied (&quot;java.io.FilePermission&quot; PATH_TO_FILE&quot; &quot;read&quot;)
  </code></pre>
  <p>BlockedException is thrown in the first case, even though when the Java plugin asks me about security issues, I always say &quot;don't block&quot;, in order for this code to run.</p>
  <p>Any ideas how I can test this? Or could you point me to an open source Java uploader applet implementation I could inspect? Of course, the deployed version of this software will be signed with a trusted certificate, but I need a means to test it....</p>
  <p>Thank you!</p>
  <h2>Update</h2>
  <p>Here is what needs to be done:</p>
  <p>Given a web application which we developed, this application needs a lot of small files from the local filesystem. So, we need to iterate over a directory structure and inspect files in order to find those that the web app needs. This is very cumbersome by hand, therefore we need to automate this.</p>
  <p>I thought of two other approaches:</p>
  <ol>
  <li>JNLP-applet, however, its API can only display a FileChooser for single or multiple files, but not for a directory</li>
  <li>A plain old Java client application, which will find the files it needs and upload them to the server via an API. This client can then be launched via Java Web Start.</li>
  <li>..Do you have any more ideas?</li>
  </ol>