R
Roedy Green
The ideal would be to come up
with a standardized way of saying "the file is in some jar of the classpath
but we don't need it's name" that the whole industry would understand and
accept.
You specifically want to exclude things on the classpath NOT in jars
though?
You could do that with a wrapper around the getResource method that
looked at the offered URL and rejected ones without a ! somewhere in
them.
You would invent a custom protocol mainly if you wanted to smuggle
this into other people's code that only understood URLs.
You could use a self explanatory protocol name
in-jar-on-classpath:xxx.txt