Java Resource Path Get getSystemResource(String path)

Here you can find the source of getSystemResource(String path)

Description

Returns a URL from the path used to load classes.

License

Apache License

Parameter

Parameter Description
path The resource path.

Return

A URL representation of the resource.

Declaration

public static URL getSystemResource(String path) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URL;

public class Main {
    /**/*from w  w w .  ja v a  2  s  .  c  o  m*/
     * Returns a URL from the path used to load classes. Relative paths will start
     * at the class loader directory.
     *
     * @param path The resource path.
     * @return A URL representation of the resource.
     */
    public static URL getSystemResource(String path) {
        return ClassLoader.getSystemResource(path);
    }
}

Related

  1. getResources(String path, ClassLoader loader)
  2. getResources(String resourcePath, Class caller)
  3. getResourceStream(final String bundle, final String path)
  4. getResourceStream(String path)
  5. getStringFromResource(Class clazz, String path)
  6. getSystemResource(String path)
  7. loadResource(final Class bundleClazz, final Class resourceTypeclazz, final String pathToFile)
  8. loadResources(ClassLoader loader, String path)
  9. resourceExists(String path)