Page 1 of 1

Threading calls to Java program

Posted: Sat Dec 22, 2012 7:35 am
by purebuilt
I have not used threading but I have a project that requires some calls (run program) to a Java program that returns information in the stdout. This is a communication call, my program takes the stdout and parses the information to a database. I know I can't get a return from a Thread, but is there a way for me to do several calls to a program using threads and then have each thread write output to separate files? I would also need to pass arguments to the Java program in the thread that are different for each thread. What is the best way to do this?

Thanks :)

Re: Threading calls to Java program

Posted: Sat Dec 22, 2012 8:35 pm
by purebuilt
What I am asking is, I need to run an outside program and feed it parameters. Then catch the output (stdout). Can that be done with threads so that the "RunProgram" calls happen asynchronously?