I try to load an xsl file with classLoader, but Test.class.getResourceAsStream("test.xsl") always returns null. Then i copied the test.xsl file to test.png - and that one works fine. Can anyone explain me how it can happen?
Here is the
test case: two identical files with different extensions reside in the same package, and classloader works with different results:
The output is:
xsl: null
png: java.io.BufferedInputStream@3d84ec44
UPD: The problem found - i was lounching this from IDEA and it was misconfigured: Resource patterns setting included *png but didn't include *xsl