Java and C# COM objects tricky problem!!!

Hi There

I am creating a Java application that needs to call a C# COM interface(a .dll file), the interface export a set of classes and those classes implement the required methods. Furthermore, the exported classes act as listeners of low level events . The java application needs to listen to those events and react.

I can't really find a way of "extending" my java classes from those exported COM classes. I dont even find a way to reference and call some of the methods inside those classes.

Any ideas? I am currently trying to use JNative, but I don't think this is going to work.

Thanks for the help

[638 byte] By [IcEtBa] at [2007-10-3 9:33:18]
# 1
Try Jawin. I have not been successful myself though. But I have read that its quite useful.
isaka at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Hi,

JNative is not intended to be a COM bridge, it's old fashioned plain DLL bridge (for now, never say never...).

You should use Jacob, J-Interop or Jawin, all of them from Sourceforge.

You can give a try to Eclipse's SWT COM bridge too.

Regards,

--Marc (http://jnative.sf.net)

Message was edited by:

mdenty

mdentya at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

You can use JNI for .NET and make interface with .NET code without COM.

JNI SDK for .NET Framework 1.1:

http://www.simtel.net/product.php[id]95126[sekid]0[SiteID]simtel.net

JNI SDK for .NET Framework 2.0:

http://www.simtel.net/product.php[id]98653[sekid]0[SiteID]simtel.net

vitallisa at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
So the COM object is listening to low level events, can those be passed to a java app with jawin?Message was edited by: IcEtB
IcEtBa at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
JAWIN does not support COM events implementation!!!
vitallisa at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6
> JAWIN does not support COM events implementation!!!Jacob does, look at it at sourceforge.--Marc ( http://jnative.sf.net)
mdentya at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 7

Ok thanks for the advice, Jacob is working but I just realized the COM object does not export IDispatch derived Interfaces,

It only exports a class(the class implements the events interface) that uses the .NET delegate system ( I don't really know how the delegate system works).

Any sugestions?

IcEtBa at 2007-7-15 4:48:27 > top of Java-index,Java HotSpot Virtual Machine,Specifications...