Java Resource Get getResource(final String resource)

Here you can find the source of getResource(final String resource)

Description

get Resource

License

Apache License

Declaration

public static URI getResource(final String resource) throws URISyntaxException 

Method Source Code

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

import java.net.URI;
import java.net.URISyntaxException;

public class Main {
    public static URI getResource(final String resource) throws URISyntaxException {
        return getClassLoader().getResource(resource).toURI();
    }//www .  jav  a 2s . c om

    private static ClassLoader getClassLoader() {
        return Thread.currentThread().getContextClassLoader();
    }
}

Related

  1. getResource(Class testClass, String resource)
  2. getResource(final Class clazz, final String res)
  3. getResource(final Class aClass, final String aName)
  4. getResource(final String name)
  5. getResource(final String res)
  6. getResource(final String resourceName, final Class caller)
  7. getResource(String filename)
  8. getResource(String filename)
  9. getResource(String folder, String name)