This is a java class which will take arguments from user and replace text inside a file.
Convert above class into replace.jar and use this as shown below.
Usage : java -jar replace.jar searchString replaceString "path_of_the_file"
searchString: String to replace
replaceString: String to be replaced
"path_of_the_file": Path of the text/xml/properties file
eg: java -jar replace.jar IPADDRESS 127.0.0.1 "C:Users\Balagangadhar\tomcat7.0.27\conf\server.xml"