title: how to get list of all files from folder inside java resources folder
body: <p>I am having <strong>multiple files</strong> inside <strong>'protocol' folder</strong>. I want to get list of files inside 'protocol' folder which is inside java resources folder (src/main/resources/protocol/...).</p>
  
  <p>so when i tried to access any one file it works fine in eclipse IDE(using main method) and also in wildfly deployment. it gives lines inside files. </p>
  
  <pre><code>List&lt;String&gt; files = IOUtils.readLines(classLoader.getResourceAsStream("protocol/protocol1.csv"));
  </code></pre>
  
  <p>but when try to read folder it works fine in eclipse IDE(got list of file names) but does not work in  wildfly deployment it gives a blank list [].</p>
  
  <pre><code>List&lt;String&gt; files = IOUtils.readLines(classLoader.getResourceAsStream("protocol"));
  </code></pre>
  
  <p>i am using jboss wildfly server version:9.0.1 and java version "1.8.0_161".</p>
  
  <p>Thanks for any help.</p>