You can read the property file values, store them in a DataStructure lets say Array and use contains method to check if the value read from command line is contained in the array or not. Let me know in case you need any help in writing code for this or you are stuck anywhere.