Java Resource Get getResourceFromBundle(Class clazz, String location)

Here you can find the source of getResourceFromBundle(Class clazz, String location)

Description

get Resource From Bundle

License

Open Source License

Declaration

public static URL getResourceFromBundle(Class<?> clazz, String location) 

Method Source Code

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

import org.osgi.framework.FrameworkUtil;

import java.net.URL;
import java.util.Objects;

public class Main {
    public static URL getResourceFromBundle(Class<?> clazz, String location) {
        Objects.requireNonNull(clazz);
        Objects.requireNonNull(location);
        return FrameworkUtil.getBundle(clazz).getResource(location);
    }//  ww w  .j a v  a2  s . com
}

Related

  1. getResourceContent(Object object, String resource)
  2. getResourceDir(final Class testClass)
  3. getResourceExpression(String select)
  4. getResourceFile(Class clazz, String fileName)
  5. getResourceFile(String name)
  6. getResourceFromFile(String filename)
  7. getResourceInBundleOrFragments(Bundle bundle, String name)
  8. getResourceListing(ClassLoader cl)
  9. getResourceMessage(Locale locale, String resource, String key, Object... params)