Properties config = new Properties();
try {
config.load(new FileInputStream(new File(URLDecoder.decode(getClass().getClassLoader().getResource(CONFIG_FILE_NAME).getFile(), "UTF-8"))));
} catch (Exception e1) {
e1.printStackTrace();
throw new RuntimeException(e1);
}
This, snippet has never let me down till now in getting a properties file.
No comments:
Post a Comment