L
Lax
Hello all,
From my Java program, I'm constructing a cmd-line one-liner and
running it from the shell on various platforms.
Is there any platform independent way to suppress error messages from
the cmd-line?
e.g., if the program does a "ls somefile.txt" on Unix and an analogous
"dir somefile.txt" on WIN, I want to suppress the error msgs, if
somefile.txt is not present.
In Unix, I could do a "ls somefile.txt 2> /dev/null".
But, is there a platform independent way to do the suppression.
Alternatively, how does one suppress the error msgs from WIN cmd?
Thanks for your time,
Prab
From my Java program, I'm constructing a cmd-line one-liner and
running it from the shell on various platforms.
Is there any platform independent way to suppress error messages from
the cmd-line?
e.g., if the program does a "ls somefile.txt" on Unix and an analogous
"dir somefile.txt" on WIN, I want to suppress the error msgs, if
somefile.txt is not present.
In Unix, I could do a "ls somefile.txt 2> /dev/null".
But, is there a platform independent way to do the suppression.
Alternatively, how does one suppress the error msgs from WIN cmd?
Thanks for your time,
Prab