Java Resource Get getResource(String name)

Here you can find the source of getResource(String name)

Description

Resources are those stored in the class path (e.g., src/main/resources).

License

Open Source License

Declaration

public static URL getResource(String name) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.net.URL;

public class Main {
    /** Resources are those stored in the class path (e.g., src/main/resources). */
    public static URL getResource(String name) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        return loader.getResource(name);
    }//from   w w  w .j  a  v a 2  s .  c om
}

Related

  1. getResource(String name)
  2. getResource(String name)
  3. getResource(String name)
  4. getResource(String name)
  5. getResource(String name)
  6. getResource(String name, Class neighbor)
  7. getResource(String name, Class caller)
  8. getResource(String res)
  9. getResource(String resource, Class context)