Java Resource Path Get getResource(final Class baseClass, final String path)

Here you can find the source of getResource(final Class baseClass, final String path)

Description

get Resource

License

Open Source License

Declaration

public static URL getResource(final Class<?> baseClass, final String path) throws Exception 

Method Source Code

//package com.java2s;

import java.net.URL;

public class Main {
    public static URL getResource(final Class<?> baseClass, final String path) throws Exception {
        final URL url = baseClass.getClassLoader().getResource(path);
        return url;
    }/* ww w .j a  va 2 s .co  m*/
}

Related

  1. getPath(final Object resource)
  2. getPathOfResource(Class clazz, String fileName)
  3. getPluginResource(Bundle bundle, String resourcePath)
  4. getRelativeResource(Class clazz, String relativePath)
  5. getResource(Class cl, String path)
  6. getResource(final String path)
  7. getResource(String path)
  8. getResource(String path)
  9. getResource(String relativePath)