jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes HI any one pls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "HI any one pls" Watch "HI any one pls" New topic

HI any one pls

maha devan
Ranch Hand

Joined: Mar 16, 2004
Posts: 50
I am calling a VB code

Process child = Runtime.getRuntime().exec(processCommand);

It generates an MS word document using an xml file stored in local directory.

If some error occurs in creation of document, how to know that error.
I tried using the getErrorStream , but nothing is getting printed.

Anyone pls
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
You'll need to find more information on the VB process. It may be that any errors that are generated are really going to stdout, not stderr. In this case you will want to look at Process.getOutputStream(), not Process.getErrorStream(). Additionally, you may be able to use the exit value of the process also. If the VB process is well designed it should exit with different values based on what error occured.

<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
I agree. Here's the link: http://aspose.com/file-tools
subject: HI any one pls
It's not a secret anymore!