private Properties getPropertiesFromClasspath(String propFileName) throws IOException {
// loading xmlProfileGen.properties from the classpath
Properties props = new Properties();
InputStream inputStream = this.getClass().getClassLoader()
.getResourceAsStream(propFileName);
if (inputStream == null) {
throw new FileNotFoundException("property file '" + propFileName
+ "' not found in the classpath");
}
props.load(inputStream);
return props;
}
You need to create an account or log in to post comments to this site.