• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

invoking C++ code from Java in a Remote AIX machine

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a word: CORBA.
 
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic