Properties properties = new Properties();
try {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
InputStream is = classLoader
.getResourceAsStream("file.properties");
if (is != null) {
properties.load(is);
value = properties.getProperty("key");
is.close();
}
is = null;
}
catch (Exception e) {
e.printStackTrace();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment