<p>How do I locate resources on the classpath in java? 
Specifically stuff that ends in .hbm.xml.</p>

<p>My goal is to get a List of all resources on the classpath that end with ".hbm.xml".</p>

You have to get a
classloader
, and test whether it's a URLClassLoader. If so, downcast and
get its URLs
. From there, open each as a JarFile and look at its
entries
. Apply a
regex
to each entry and see if it's one that interests you.
Clearly, this isn't fast. It's best to be given a name to be looked up in the classpath, perhaps listed in a standard file name in the META-INF directory of each classpath element, similar to the technique used by the
ServiceProvider facility
. Note that you can
list all files
with a given name on the classpath.