You can have multiple jdbc drivers in the same java program, there's nothing wrong with that. Did you try ClassLoader.getResourceUrls()
(which will return all matching urls) instead? then you can find the one you want.
Alternately, those META-INF files are really part of the ServiceLoader mechanism, so maybe you would be better off using that class.
Lastly, if you are just trying to use a jdbc driver, you don't need to do any of this. you just need to create a driver with the correct url, and the jdbc framework will automatically find the right driver if it is already on the classpath.
UPDATE:
If your intent is to examine a specific jar file, then you shouldn't be using a ClassLoader, as it will do all kinds of things you don't want. Just use JarFile to examine the jar and extract the information you desire.