A simple and smart way of loading a properties file which is located some where in the classpath
-------------------------
InputStream in = null;
Properties m_Properties = null;
in = ClassLoader.getSystemClassLoader().getResourceAsStream(fileName);
if (in != null)
{
m_Properties = new Properties ();
try {
m_Properties.load (in);
}
catch (IOException e)
{
{
e.printStackTrace();
}
}
No comments:
Post a Comment