Retrieving and sorting list of files at runtime from Jar
<p>I'm fairly new to Java (and stackoverflow for that matter) so I'll try my best to be on-point. I'm using Eclipse Juno and JavaSE 1.7.</p>

<p>I would like to create a data structure which allows me to dynamically sort and retrieve the files I'll need at runtime. These files will be scripts which are processed depending on "where" they were found, or what "type" they belong to. For example, a script relevant to processing commands from the command line would be a "command" script.</p>

<p>I've learned that "directories" in a Jar are more-or-less meaningless, so a clever usage of those proved useless. Although, there are some hacks to make it work, I'd like a more robust solution.</p>

<p>(I have seen the following threads questions and answers:
<a href="http://stackoverflow.com/q/1429172/1613364">How do I list the files inside a JAR file?</a> and
<a href="http://stackoverflow.com/q/346811/1613364">Listing the files in a directory of the current JAR file</a>)</p>

<p>After some thought, I've decided I need to rethink how I'll retrieve these files and this is where I'm at a loss considering my underwhelming knowledge of Java still. I find myself hopping around the internet aimlessly looking for answers, which is when I decided I should ask the question directly.</p>

<p>My questions is this: What is the best approach to creating a meaningful file structure which allows me to retrieve (script) files relevant to how I want to process them at runtime?</p>
