is it possible to run a process inside my code and then see both output streams (the process and mine) on the screen?
I need to see what the other process doing in parallel with my own code!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to start a thread which reads data from the
Processoutput stream, and prints it onSystem.out.You can use a class like this:
Here’s some test code for that class:
Output: