One of the challenges we face while creating test suite is to put common settings into a file and read it from code as and when neccessary. I did struggle a bit so thought sharing this might help any one who encounters similar problem.
1) Create a file say in ur src folder or create a new package config and put a file called config.properties
2) From the file where you want to read create a varaiable like
3) Then load the content into it from the file you have created
FileInputStream fn = newFileInputStream("path to project"+ \\src\\configure\\config.properties);
4) Put a value into file config.properties which has to be read
5) To read value from file
Some more system properties can be read from system as well
ex: System.getproperty("user.dir") for project
Wil share a sample code some time later but the above steps should help.