Re: Java - C# interop
From: SirThanxALot (sirthanxalot_at_spymac.com)
Date: 02/08/05
- Next message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Previous message: Marty: "RE: ExternalException while sending data to the Clipboard on Server 20"
- In reply to: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Next in thread: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Reply: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Reply: dc: "Re: Java - C# interop"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 08 Feb 2005 10:57:39 +0100
Thanx for the most informing reply.
So now it comes down to this:
I need to the C# in Java thingy.
For now, I see the JNI dll writing in C# as a last resort.
I'd better make a VC++ wrapper/bridge
something like
java <-1-> jni <-2-> c++ <-3-> C#
parts 1 and 2 are ok for me
3 remains an issue as Thomas Fritsch stated
I just want to do this. Ihave made a class in C#
I want to create an instance of it (from within C++) and invoke
methods on it.
Thanx,
srtnxalt
Alessandro Angeli [MVP::DigitalMedia] wrote:
> SirThanxALot wrote:
>
>
>>Is there a way for interop between C# and Java?
>
>
> JAVA IN C# 1. You can register your Java classes as COM
> objects using the ActiveX Bridge in the JDK and then use COM
> InterOp.
>
> JAVA IN C# 2. Use P/Invoke to use the JNI invocation API and
> System.Reflection.Emit to call the native JNI funtions in
> the JNIEnv structure. This is a hack, it's difficult and
> practically undocumented.
>
> C# IN JAVA. You can write a JNI DLL in C# by using
> System.Reflection.Emit to call the native JNI funtions in
> the JNIEnv structure and then usng ILDasm and ILAsm to
> create exported JNI functions from the C# DLL. This is a
> hack, it's difficult and practically undocumented.
>
>
>>Is it possible to use the JNI with C#
>>Or do I have to do a workaround with (V)C++?
>
>
> Using mC++ is a lot easier. You can think of creating a JNI
> wrapper in mC++ instead of writing it all in mC++.
>
> There are a couple of Java/.NET interop libraries somewhere
> on the web.
>
> You can also just create the Java part and the .NET part in
> 2 separate processes and then use socket streams to make
> them communicate.
>
>
- Next message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Previous message: Marty: "RE: ExternalException while sending data to the Clipboard on Server 20"
- In reply to: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Next in thread: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Reply: Alessandro Angeli [MVP::DigitalMedia]: "Re: Java - C# interop"
- Reply: dc: "Re: Java - C# interop"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|