title: How to store each file in a zip archive, in an array using Java?
body: <p>Ideally, I want to just read the zip archive and store each of the files in an Iterable ready to be compiled. (assume the zip only contains .java files)</p>
  
  <p>Something like this would be good, but this won't work as I can't get the path of each file in the zip.</p>
  
  <pre><code>private ArrayList&lt;String&gt; javaFilePaths = new ArrayList&lt;String&gt;();
  Iterable&lt;? extends JavaFileObject&gt; = fileManager.getJavaFileObjectsFromStrings(javaFilePaths);
  </code></pre>
  
  <p>Is it possible to have each element of the <code>ArrayList</code> to be the path to a file in the archive? So far I've only been able to go through the zip archive and get all the filenames which is useless as when I call <code>getJavaFileObjectsFromStrings(javaFilePaths);</code> it will not be the full path to the file. Maybe I need to store the content of each file in a new <code>JavaFileObject</code> first? Really not sure of the best way to go about this...</p>
  
  <p>Can someone please help with this, it's proving very tricky!</p>
  
  <p><code>UPDATE:</code></p>
  
  <p>Thinking maybe of storing each file in the zip archive as a <code>File</code> object in an array of type <code>File</code></p>
  
  <p>Then calling the <code>getJavaFileObjectsFromFiles(arrayOfFiles);</code> method.</p>
  
  <p>Solutions, ideas?</p>