Class Resources


  • public final class Resources
    extends Object
    Since:
    2.0
    • Method Detail

      • getResource

        public static URL getResource​(String resourceName)
        Returns a URL pointing to resourceName if the resource is found using the context class loader. In simple environments, the context class loader will find resources from the class path. In environments where different threads can have different class loaders, for example app servers, the context class loader will typically have been set to an appropriate loader for the current thread.

        In the unusual case where the context class loader is null, the class loader that loaded this class (Resources) will be used instead.

        Throws:
        IllegalArgumentException - if the resource is not found