Question: what is the difference between class.getresource() and classloader.getresource()?
Answer: getResource can take a "relative" resource name, which is treated relative to the class's package. Alternatively you can specify an "absolute" resource name by using a leading slash. Classloader resource paths are always deemed to be absolute. The first call searches relative to the .