• Post Reply Bookmark Topic Watch Topic
  • New Topic

Making a C++ and Java program "Talk"

 
Mark Davey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! I want to connect two programs that we've written...one
in C++ and one in Java. Basically, I would like to have them
talk to each other via Strings. I would like to send a
string object from the Java side over to the C++ program...
have it do something and then send a string back. I can
handle all the strings, but I'm looking for the best way
to implement this sort of client-to-client program.
Can I do this with just Socket connections? Do I need to
write a server to handle two clients, and if so, how do I
make sure that I can send the string only to the one other
specific client? Any help would be appreciated or any idea
where to get started. (Will I have to use CORBA? I thought
that might be overkill....)
-Mark
 
Jamshed Dastur
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya buudy YOu will have to use corba
i dunno the details but talkin from one java prog to a C++ program you will need Corba
 
tony casey
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use sockets to get C++ and Java apps to talk and you don't need to use CORBA (you're right when you say it's overkill). If you wanted to be a bit more adventurous than sockets you could use the JNI (see the tutorial) where you create a C++ library for your java application to call methods on.
Tony.
 
cynthia zhuang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW:
if I use corba , how can I make sure that I send the string to the right specific client?
Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!