getResource - Traverse directory in jar
807601Jun 13 2008 — edited Jun 14 2008Hi
I have a directory called "SupportingFiles" in my Java project, and this is included in the jar. During runtime I would like to use all the ".txt" files available in that directory. Basically I am trying to get a list of all "*.txt" files available in "SupportingFiles".
I have tried various ways with this.getClass().getResource() and this.getClass().getResourceAsStream(), but no luck.
Could anyone help me in getting this done? Basically I want to traverse all the "*.txt" files in a directory which is enclosed in the jar.
Thanks
Srikanth