Hi,
i have a question about pipes in general. I have never used them before
in Linux or Java, so is there any information or tutorials on creating
two-way pipes in Java or C or any program in Linux in general.
thanks,
Justin Lawler
Gregory Steuck wrote:
> > "David" == David Chen <[EMAIL P
Thanks for all the replies to my question.
Most of suggestions focus on starting the C program as a separate process
then using pipes to communicate between the C and the Java program.
I have to add 3 conditions here which I didn't clearly explained in my
previous mail.
Condition 1:
I am using
If you are running the C program within the Java app, you start the C app with
the class Runtime. This creates a Proces, and you have acces to the C app's
stdin / out as ioStreams. Capture this and send to your text component,
whatever...
Mike
David Chen wrote:
> Hi all,
>
> I have a general Ja
> "David" == David Chen <[EMAIL PROTECTED]> writes:
David> In the pre-developed project there are a lot of printf
David> functions. Now I have to show the outputs of printf in a
David> swing text fileld. The question is how can I do this without
David> touching the pre-writt
AFAIK if you use jni it doesn't create separate process. The problem is to
capture output of the same process.
For Unix-only solution I would try to create named pipe, redirect java
process's output to that pipe and see if I can read it from inside the program.
It's just an idea. I haven't tried
Here's one way of trapping stdout from an unrelated program. I'm pretty
sure there's better way, but this works in Blackdown 1.2v1.
Process process = Runtime.getRuntime().exec("yourprogram");
process.waitFor();
// getInputStream() returns the input stream connected to the norm
Hi all,
I have a general Java question.
I was asked to make a Java GUI interface for a pre-developed project which
was written in C. The C programs provided a set of APIs. I constructed the
GUI using swing and made the jni program. It's functionlly working.
In the pre-developed project there