RunTime.getRunTime().Exec()
Hi All,
I am trying to trigger a VB script through a Java program.
I am able to trigger the script by using 'RunTime.getRunTime().Exec(commands)'. commands are the arguments which I am passing it to the script.
My requirement is whenever the VB script returns an error message on the cmd line interface, I need to capture that error message in the Java program. Is it possible?
I tried with getErrorStream, but the program is returning null.
Just I want to make sure, is it possible from the Java program to capture the error messages returned by the VB script.
A snippet of code
Process p=Runtime.getRuntime().exec(commands);
BufferedReader input =new BufferedReader (new InputStreamReader(p.getErrorStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
line = input.readLine(), it is returning null, but the VB script is throwing an error message.
Any ideas please
Thanks

