Here you can find the source of getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz, String filepath)
public static InputStream getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz, String filepath)
//package com.java2s; import java.io.InputStream; public class Main { public static InputStream getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz, String filepath) {//ww w . j a v a 2 s . c o m return clazz.getClassLoader().getResourceAsStream(filepath); } }