I am trying to call a Unix script from a Java program using Runtime.exec(). Whatever is being echoed in Unix script should be captured in Java program. I have tried to use getInputStream. It is not working. Can you please help. ?
And also TellTheDetails(←click) about what you mean by "not working." If there's an error message, copy/paste the entire message, and indicate clearly which line is causing it. Otherwise, explain what behavior you're observing and what behavior you expected.
You may also find this old chestnut of an article useful. I suspect a few things may have been fixed since it was written, but it's worth being aware of them.
Also: Did you realize that executing a Unix script flies in the face of "platform-independence"? You might be better off to write a program that takes the output of a Unix script and does something with it.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
It's feeding time! Give me the food you were going to give to this tiny ad: