I googled a lot but still don't understand Why ClassLoader.getResource("/pkg/readme.txt") always return null? otherwise without the leading slash, ClassLoader.getResource("pkg/readme.txt") can return a correct URL.
I do understand the diff between those methods in Class and ClassLoader.
NOTE: I'm not asking the diff between Class.getResource() and ClassLoader.getResource() because I get it. My concern is on ClassLoader.getResource() does not work for a resource name which starts with a leading slash