Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

java and c

Thread view: 
focode - 21 Apr 2007 12:16 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
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       |



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.