Log4j 1.1b7

org.apache.log4j.helpers
Class Loader

java.lang.Object
  |
  +--org.apache.log4j.helpers.Loader

public class Loader
extends Object

Load resources (or images) from various sources.

Author:
Sven Reimers, Ceki Gülcü

Constructor Summary
Loader()
           
 
Method Summary
static URL getResource(String resource, Class clazz)
          This method will search for resource in different places.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Loader

public Loader()
Method Detail

getResource

public static URL getResource(String resource,
                              Class clazz)
This method will search for resource in different places. The rearch order is as follows:

  1. Search for fully/qualified/clazz/name/resource with the ClassLoader that loaded clazz.

  2. Search for fully/qualified/clazz/name/resource with the null (bootstrap) class loader.

  3. Search for resource with the class loader that loaded clazz.
  4. Try one last time with ClassLoader.getSystemResource(resource)

Log4j 1.1b7

Please notify me about new log4j releases.