Heres sample program to read the properties file.
public class Foo {
public static void main(String[] args){
try{
File f = new File(args[0]);
Properties prop = new Properties();
prop.load(new FileInputStream(f));
String property1 = prop.getProperty("property1");
System.out.println(property1);
}catch(FileNotFoundException e){
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}
}
}