i have developed a program in turbo c3 which communicates with
parallel port of my pc , through which i am able to control the
working of some electrical appliances , i want to communicate with
that program from my java program , how can this be made possible ?
If any one can help me , plz
hellovinu@gmail.com - 21 Apr 2007 16:01 GMT
> i have developed a program in turbo c3 which communicates with
> parallel port of my pc , through which i am able to control the
> working of some electrical appliances , i want to communicate with
> that program from my java program , how can this be made possible ?
> If any one can help me , plz
in java you can us ethe package javax.comm ,but you have to download
it from sun.com
Philipp Leitner - 21 Apr 2007 18:56 GMT
> i want to communicate with
> that program from my java program , how can this be made possible ?
> If any one can help me , plz
You can use JNI (Java Native Interface) to communicate with C(++)
applications. Look at java.sun.com, there's a good JNI tutorial
available.
/philipp
Oliver Wong - 26 Apr 2007 15:50 GMT
>i have developed a program in turbo c3 which communicates with
> parallel port of my pc , through which i am able to control the
> working of some electrical appliances , i want to communicate with
> that program from my java program , how can this be made possible ?
> If any one can help me , plz
It depends on the interface that your C program exposes. If your C
program can communicate via stdio, you could have your Java program talk
to it that way. If your C program monitors a specific directory for files,
your Java program may be able to communicate by producing the appropriate
files. If your C program listens on a socket, your Java program can
communicate with it via sockets.
- Oliver
Martin Gregorie - 26 Apr 2007 21:32 GMT
>> i have developed a program in turbo c3 which communicates with
>> parallel port of my pc , through which i am able to control the
[quoted text clipped - 8 lines]
> files. If your C program listens on a socket, your Java program can
> communicate with it via sockets.
The OP mentions Turbo C 3, so presumably that's Borland C. Borland C
4.5 didn't include either sockets or poll() in the standard C library. I
speak ANSI C, not C++ so can't tell whether the C++ classes might
support sockets: however as "sockets" doesn't appear in any
documentation indexes my guess is that it doesn't, so version 3 won't
either.

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |