M
Manish Hatwalne
I have a command line client which takes and input file and produces some
output file, along with few other arguments. I am trying to run this program
from my Java code. This is what I have done -
String args[] = {clientPath, "-l", "-a", clientIPAddress, "-u", userName,
"-p", userPass, "<", inputFile, ">", outputFile};
Process p = Runtime.getRuntime().exec(args);
p.waitFor();
But, it doesn't work (as in the output file is not created). However, if I
create a batch file with this command line and execute it from the Java
code, it works fine. What could be the problem???? I have verified that the
command is the batch file and in Java code is exactly same.
Where should I look now???
TIA,
- Manish
output file, along with few other arguments. I am trying to run this program
from my Java code. This is what I have done -
String args[] = {clientPath, "-l", "-a", clientIPAddress, "-u", userName,
"-p", userPass, "<", inputFile, ">", outputFile};
Process p = Runtime.getRuntime().exec(args);
p.waitFor();
But, it doesn't work (as in the output file is not created). However, if I
create a batch file with this command line and execute it from the Java
code, it works fine. What could be the problem???? I have verified that the
command is the batch file and in Java code is exactly same.
Where should I look now???
TIA,
- Manish