passing data between Java program and C program--help

P

pipi

Can I pass data between a java program and a C program on the same machine?
what machanism should I use?
thanks,


wh
 
J

Joseph Millar

Can I pass data between a java program and a C program on the same machine?
what machanism should I use?
thanks,

As folks have told you previously, there are several ways to
do this depending on what you need and exactly what form this
C program takes.

1. JNI. THis allows you to write C/C++ code that can be called
directly from your Java code. See the JDK docs and Sun
Tutorial for further info.

2. CORBA. Put a CORBA interface on your C and program and use
the CORBA classes in Java to talk to it.

3. Sockets. Use network sockets to talk from one program to
the other.

4. Files. Write info into a file from one program and have the
other one read it.

Without more info as to exactly what you want to do, there's
not much more we can do to suggest possible approaches.

--Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top