I have a few jars which contain some resources with the same name. Lets say I have a.jar and b.jar and they both contain resource.xml. I know I can get a resource calling
getClass().getClassLoader().getResourceAsStream("resource.xml");
But AFAIK it may return a resource either from a.jar or b.jar. I want to pass the jar file name and get the resources from the specified jar.