[Mono-list] Mono/Java interop? (fwd)

Mathias Hasselmann mathias.hasselmann@gmx.de
Thu, 7 Nov 2002 16:54:50 +0100 (CET)


tst... didn't realize that i was responding to a message sent pm by 
accident... d'uh...

---------- Forwarded message ----------
Date: Thu, 7 Nov 2002 16:36:56 +0100 (CET)
From: Mathias Hasselmann <mathias.hasselmann@gmx.de>
To: "fgonthier@hermes.usherb.ca" <fgonthier@hermes.usherb.ca>
Cc: Mathias Hasselmann <mathias.hasselmann@gmx.de>
Subject: Re: [Mono-list] Mono/Java interop?

On Thu, 7 Nov 2002, fgonthier@hermes.usherb.ca wrote:

> > > While I don't think there's a *general* solution for (c), it can be
> > > imporved by building a mapping for a wide variety of common
> > Class-Type
> > > pairs. 
> > 
> > 	I only see the need of recreating the interfaces of the referenced 
> > objects by using reflection mechanisms. From my understanding  of the 
> > .NET technology it should be possible to teach C# late binding if this
> > 
> > is possible for VB.Net already...
> > 
> 
> If I could use a Java-Mono bridge, calling Java methods using something like 
> CallJava(someObject, "SomeMethod", param1, param2, ...). 

[...]

> Oh yeah, CORBA support for Mono would sure be great but my views on Java/Mono 
> interop. was more modest.  I'm pretty sure there would be a way for Mono to 
> speak to a Java VM using JNI like I described earlier.

	Considering this statment I recall that the JNI offers a bunch of
functions of the form "jobject NewObject(env, class, methodId, args...)"  
and "jobject CallObjectMethod(env, obj, methodId, args...)". Hmm...  This
Java-Bridge could turn out to be yet another excercise in PInvoke
mechanism...

	Well, having learned that, only question left is: "Who is in the
team?" -- Uninpendently from the answers on this question I'm going to
start wrapping "/usr/java/jdk/include/*" into a set of PInvoke classes.  
The namespace I'd like to reserve for would be one out of "Mono.Java",
"Mono.Interop.Java" or "Mono.Runtime.InteropServices.Java". Which one will
I get? License considered to use would be MIT?


Ciao,
Mathias

PS: Appears to turn out more and more that PInvoke is one of the 
most fancy features of the .NET platform... ;-)