Quote:
After this the executable seems to waiting for some input...
But all the parameters are already given in arg1.
If i execute this file(moses) from outside the application, it asks for input only in case when the paramters are not given properly.
|
When u run ur binary in command mode, it already having controlling terminal, So it can ask for parameters to input, But wen u run using java, it does not have its controlling terminal, So it may happn that ur prog get stuck.
So kindly make sure that ur supplied parameters are correct.
Code:
String[] arg1 = { (1) "/bin/sh",
(2) "-c",
(3) "/home/nakul/moses/mosesdecoder/trunk/moses-cmd/src/moses -f /home/nakul/moses/mosesdecoder/trunk/scripts/training/moses-scripts/scripts-20110405-1055/training/model/moses.ini",
(4) "-i",
(5) s22,
(6) "-v",
(7) "2"
};
In above code, U have array of strings, and the fifth argument
s22 doesn't seem to a string.
(In this case u might be getting compile time error).
In addition,
Please post moses's output, what u get in command & java mode.