Load A Property File From Classpath?
im using this code Code:
public class PropertiesLoader {
public Properties getPropertiesFromClasspath(String BankProperties) throws IOException {
Properties props = new Properties();
InputStream inputStream = this.getClass().getClassLoader()
.getResourceAsStream(BankProperties);
if (inputStream == null) {
throw new FileNotFoundException("property file '" + BankProperties
+ "' not found in the classpath");
}
props.load(inputStream);
return props;
}
}
and im trying to call the method and in reviving the exception im think that i should put something else instead of BankProperties but what??