Java process inputstream in thread

Posted by Norbiprog on Stack Overflow See other posts from Stack Overflow or by Norbiprog
Published on 2010-03-16T22:07:46Z Indexed on 2010/03/16 22:11 UTC
Read the original article Hit count: 408

Filed under:
|
|
|
|

Hi!

I develop an Eclipse plugin and I have a problem

My code is the following one:

String run_pelda = "cmd.exe /C pelda.exe";
Runtime pelda_rt = Runtime.getRuntime();
Process pelda_proc = javacheckgen_rt.exec(run_pelda);

And after I would like to read the inputstream:

InputStream toolstr = tool_proc.getInputStream();
InputStreamReader r = new InputStreamReader(toolstr);
BufferedReader in = new BufferedReader(r);

But my new Eclipse instsnce doesn't work. I think I should do it in java threads, but unfortunatelly I don't know to use it correctly.

Please give me some ideas!

© Stack Overflow or respective owner

Related posts about eclipse

Related posts about java