Loading a directory with getResource in Java
Issue
- What is the correct behavior of calling getResource on Class or ClassLoader with a directory in a jar?
-
Invoking the following code behaves differently on WebLogic and EAP:
URL baseUrl = ExampleClass.class.getResource("."); URL url = new URL(baseUrl, "META-INF/wsdls/example.wsdl"); - What is the correct behavior of calling getResource on Class or ClassLoader with a directory?
Environment
- Red Hat JBoss Enterprise Application Platform 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.