I have this application that needs to iterate thru a "resource" folder to look at all the XML (config) files inside and use that for something...

My problem is that I like to deploy the application using Java Web Start which means that I need to packaged this folder into the JAR file; and so iterate thru the folder withing a jar files will likely require the use of ClassLoader... However, when I am making enhancements/changes on my PC with Eclipse, the folder is not in a jar... Does anyone has a best practice (or prefer approach) for this:
1. Do I hardcode my code so that I implement 2 methods (one for handling the application when it is deployed in a jar and one for when it is being run from an IDE)?
2. Is there a setting in Eclipse such that it will run/debug after packaging everything as a jar first?
3. Are there Java code that can handle (take care) the situation that the resource is in a jar OR in a local file system?
4. OR?


--Chung Ley