This is a multi-part message in MIME format.
------=_NextPart_000_054B_01C1937C.D0B22C50
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
Hello!
I shortly declare my opinion.
1) You can estabilish connection with C executable using TCP sockets.
Define the utility protocol for data excange.
After connection is estabilished, use OutputStream (or its wrappers)
to send your data.
I think better is to send chains of bytes.
2) You can use C-module (dll) for data exchange and call it from java by
means of JNI.
GL
Michael.
Happy New Year!!! =3D:o)
----- Original Message -----
From: Chan Ahn
To: Professional Java
Sent: Wednesday, December 26, 2001 3:34 AM
Subject: [pro_java] How can Java talk to an executable written in C?
---
Need a present for your favorite programmer?
E-Documents from Amazon.com at http://p2p.wrox.com/edocs.asp
---
Hi,
I need to build a front-end for a command-line-based executable
written in C and do not know how to go about this.
The executable takes an input file and some other options as parameter
and produces a text file as an output. Basically, I need to find a way
for Java-based front-end to pass the parameters, including the input
file, to the executable and once the executable has done its work, I
want the front-end to display the output file in whatever format is
appropriate.
I would like to make use of XML in the communication between the Java
front-end and the C executable, if that is possible/necessary. I have an
access to the source code of the executable, but would prefer to deal
only with the executable, if that is possible.
Is there anyone who can help me on this? Thank you very much in
advance.
If more information is required, I'm more than happy to supply
anything I have. J
Best regards,
Chan
$subst('Email.Unsub').