Campbell Ritchie wrote:I hope you haven’t tried Runtime.exec() without reading the classic Michael Daconta article “When Runtime.exec() won’t”. The ProcessBuilder class makes the process slightly easier.
@nirjari: Or indeed, find another way of doing this. I'm sure others will jump all over me here, but what you're doing just doesn't sound right.
Either this a Java program whose sole purpose is to process the output of this perl script, or it's part of a larger system of which this is only a tiny part.
If it's the first, why not simply pipe the output of your perl script to your Java program?
If it's the latter, it might be worth considering whether
you should either:
(a) Re-write this perl script in Java.
(b) Put the output of this script in a known file.
Maybe I'm just behind the times; but I get very leery about things like
Runtime.exec()'s and ProcessBuilder's.
Winston