title: How to get all files in a directory in java applet?
body: <p>I know how to get all files in a directory in a local app, but when it comes to applet, it doesn't seem to work too well.</p>
  
  <p>The way I normally do:</p>
  
  <pre><code> File file = new File("myDirectory");
   File[] files = file.listFiles();
  </code></pre>
  
  <p>I tried the same thing and it didn't work for my applet. My src has the standard maven project structure. i.e.:</p>
  
  <pre><code>src\main\java\mypackage\MyApplet.java
  src\main\resources\myDirectory\&lt;... bunch of files here...&gt;
  </code></pre>
  
  <p>So how do I get all the files in myDirectory from MyApplet.java?</p>