Thanks a lot for this thread! This one worked for me..

Properties configFile = new Properties();
configFile.load(new FileInputStream(
"/test/sample/file.config"));

String myVar = configFile.getProperty("configVar");