Java ClassPath getResourceFromClasspath(final String fileName)

Here you can find the source of getResourceFromClasspath(final String fileName)

Description

get Resource From Classpath

License

Apache License

Declaration

public static URL getResourceFromClasspath(final String fileName) 

Method Source Code

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

import java.net.URL;

public class Main {
    public static URL getResourceFromClasspath(final String fileName) {
        return Thread.currentThread().getContextClassLoader().getResource(fileName);
    }//from  w w w  .  j  a va  2 s .  c o  m
}

Related

  1. getFileFromClasspath(String name)
  2. getFileFromClasspathResource(String resource)
  3. getFilePathFromClasspath(String filename)
  4. getFullPath(String classPath)
  5. getInputStreamFromClasspathFile(final String fileName)
  6. getStreamFromClassPath(String source)
  7. getSystemClassPath()
  8. getSystemClasspathEntries()
  9. isInClassPath(String location)