Try using Properties.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File file = null;
try {
// read the property text file
file = new File("o:\\simulator\\myproperty.prop");
FileInputStream fis = new FileInputStream(file);
Properties prop = new Properties();
// feed the property with the file
prop.load(fis);
// Get the application to print out all the key and the value
// of your property file
Enumeration enum = prop.propertyNames();
while (enum.hasMoreElements()) {
String key = (String) enum.nextElement();
String value = (String) prop.get(key);
System.out.println(key + ":" + value);
}
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
}