How to get the list of files under the directory in a JAR file
<p>I want to know the list of files under the 'META-INF/config' directory in a JAR file.</p>

<p>I am using the below code to retrieve the files list. But it is failing.</p>

<pre><code>    Enumeration&lt;URL&gt; path = Thread.currentThread().getContextClassLoader().getResources("META-INF/config/");
    while(path.hasMoreElements())
    {
      URL path1 = path.nextElement();   
      System.out.println("File =" +path1.getFile());
      File configFolder = new File(path1.getPath());
      File[] files = configFolder.listFiles();
      for (File file : files)
      {
        System.out.println("\nFile Name =" + file.getName());
      }
    }
</code></pre>

<p>Can somebody help me in fixing this?</p>

<p>Thanks In Advance,
Maviswa</p>
