sanjay kams wrote:But I want the response based on the parameters that I pass to the .exe file. I don't know how to pass the parameters dynamically. Can anyone help on this.
Well, where are your parameters? I don't see any in your code. You can either add them to the end of your command String, separated by spaces, or put them in an array after the command itself and use the method that Pawel suggested (right now, you're NOT).
BTW, I wouldn't code your
catch block like that either, because your program will simply carry on after an error.
My advice: Forget the
try...catch and just add
throws IOException to the method.
Winston