public static Properties loadProperties(String fileName) throws IOException {
  Properties prop=new Properties();
  InputStream propIn=new FileInputStream(fileName);
  try {
    prop.load(propIn);
  }
  finally {
    propIn.close();
  }
  return prop;
}

public static Properties loadProperties ( String fileName ) throws IOException { Properties prop = new Properties ( ) ; InputStream propIn = new FileInputStream ( fileName ) ; try { prop . load ( propIn ) ; } finally { propIn . close ( ) ; } return prop ; }
loads properties from file .
