Posted By:
Priya_Narayan
Posted On:
Tuesday, April 17, 2001 08:41 PM
Hi, I am having some problems calling a java program from a C++ program. I am not sure where I should post this question, whether in the C++ group or the Java group or the Unix group. Please do read through and help me if possible. I have coded a C++ interface program called "meeting_interface" which runs as a deamon process and invokes a java program on the receipt of a message. The purpose of the java program "MulticastChat" is to establish a multicast session between users in different hosts. What happens is that the meeting_interface program is running as a deamon process in hosts X and Y. When the meeting_interface program in host
More>>
Hi,
I am having some problems calling a java program from a C++ program. I
am not sure where I should post this question, whether in the C++ group
or the Java group or the Unix group. Please do read through and help me
if possible.
I have coded a C++ interface program called "meeting_interface" which
runs as a deamon process and invokes a java program on the receipt of a
message.
The purpose of the java program "MulticastChat" is to establish a
multicast session between users in different hosts.
What happens is that the meeting_interface program is running as a
deamon process in hosts X and Y. When the meeting_interface program in
hosts X and Y receive the "start meeting request" they call the java
program
through the execl system call.
The C++ program calls the "MulticastChat" successfully. The
meeting_interface in X succesfully initiates MulticastChat program, the
chat program opens a multicast socket, and joins the group. However when
the host in Y calls the MulticastChat program and tries to open the
MulticastSocket ,
I get a "BindException" which says "Premission denied".
Theorotically I should be able to have multiple hosts bind to the same
socket in Multicast. I have a feeling this problem is either because I
am calling the java program using execl or it is because I am making the
interface program a deamon process.
Please take note that the MulticastChat jave program succesfully runs
in both the hosts when I run the program as a standalone program ie
executed from command line as java MulticastChat.
Hence my problem is because of the linking between C++ and Java.
If any one has any suggestions, please do help me out.
Your help would be greatly appreciated.
Thanks
<<Less