Here you can find the source of loadPropertiesFromClasspath(Class loadResourceClass, String classpath)
public static Properties loadPropertiesFromClasspath(Class loadResourceClass, String classpath) throws Exception
//package com.java2s; //License from project: Apache License import java.io.InputStream; import java.util.Properties; public class Main { public static Properties loadPropertiesFromClasspath(Class loadResourceClass, String classpath) throws Exception { //get the build number Properties aprops = new Properties(); InputStream ios = loadResourceClass.getResource(classpath).openStream(); aprops.load(ios);/*from w ww. ja va2 s . c o m*/ return aprops; } }