Originally posted by Rishi google:
Hi,
How can we invoke the C/C++ program deployed in a AIX server from the Java code in the Windows code ?
Also can we pass a message back from AIX box after successfull completion of the C++ code ?
Thanks,
You can invoke any native code whose binaries can support the C calling convention and that would include static C++ methods. Remote calls are a completely different problem. Direct invocation is impossible regardless of what language you use or what operating system the target host is running.
What you need is a bridge and CORBA is certainly the de facto standard for calling C/C++ from Java over the wire. This requires CORBA running on both ends. Alternatively you can write a Java proxy on AIX and use RMI or plain sockets. From there you can call your C/C++ methods using JNI. Sounds like lots of work but if you just have a few simple delegates and no CORBA it's actually rather simple.