I am not sure if this fits in the "Basic" section or here. So pardon me if I am posting in the incorrect forum.
I have a requirement to load all XML files on the classpath that have a "table" in their name. In Unix terms, this might mean something like:
find . -name *table*.xml
Can this be achieved in Java? (I mean the functionality, not the script execution )
Also, on similar lines, is it possible to get all classes which have a name with following a patter or all classes that have implemented a specific interface?
Joined: Nov 06, 2002
What do you mean "load all XML files"?
Whatever little I understand from above problem, see if the below steps help: 1. Get the classpath settings at run-time. You can use System.getProperty ("java.class.path"). This gives the complete filepaths. 2. Find all the files with .xml extension as File objects in the above filepaths 3. Process the files that match your criteria i.e. File names having "table" in it.
You can try the same approach for you second question also.
You can't wake a person who is <b><i>pretending</i></b> to be asleep.<br />Like what <b>"it"</b> does not like - <i> Gurdjieff </i>