aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Java-COM, Jacob, C++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java-COM, Jacob, C++" Watch "Java-COM, Jacob, C++" New topic
Author

Java-COM, Jacob, C++

Alexandr Shvedov
Greenhorn

Joined: Jul 12, 2006
Posts: 23
Hello!
I have a couple of questions concerning of Java - COM access.
I need to organize data exchange beetween C and Java Program. I decided to use COM technology for that task. I did COM object and registered it. This object represents hardware device and Java program simulate this device, drawing some blinking lamps and so on. The C++-program on the other side communicate with this device.
The idea is that user might "switch ON" device only from Java program. "Switch ON" means that COM object must be created by command. C-program when lanched must be connected to this object, and must not create a new one. I know that there is ROT(Running Object Table) in system, and it is possible to get object from there. The questions are:

1. Does anybody do something like that? Do you have any advices for me?
2. If I'll use JACOB does it register object in ROT, when I'll call createActiveXInstance()? If not then I'll probably should deal with JNI.
3. Do you have some sources of information where to get C++ code samples (Creating object, registering in in ROT, getting reference to it)?
Thank you.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Google for "Java COM Bridge". There are many products of varying costs and capabilities. There are even all Java implementations of DDE.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jean-Francois Briere
Ranch Hand

Joined: Mar 03, 2004
Posts: 101
With JACOB you have the ActiveXComponent.connectToActiveInstance() method so you could verify if its already running before creating it.

Regards
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java-COM, Jacob, C++