Code:
import java.util.*;
...
...
// Read properties file.
Properties properties = new Properties();
try {
properties.load(new FileInputStream("filename.properties"));
} catch (IOException e) {
}
// Get a value based on a key
String string = properties.getProperty("key1"); That should do it, or something close to it.