[Mono-list] Mono/Java interop?

Daniel Morgan danmorg@sc.rr.com
Wed, 6 Nov 2002 20:43:22 -0500


Here's some crazy ideas:

1. Create a CORBA layer in Mono.  I believe somone started this, but I don't
know
   how far they got.  Create a CORBA channel using System.Runtime.Remoting
   interfaces.  See the SOAP stuff to see how it was implemented.
   In mcs cvs,
   look at
   mcs\class\System.Runtime.Remoting\System.Runtime.Remoting.Channels.CORBA
   However, this is just a stub.
2. Use (Java Native Interface) JNI to create a native C library.
   Within this C library, embed Mono.  In
   mono cvs, see a file mono/docs/embedded-api on how to embed Mono in an
   application.  There is even a sample for it too.
3. Take a look at Mozilla to see how their XPCOM/XPConnect stuff works.
4. Use Web Services

-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
Behalf Of Norbert Harrer
Sent: Wednesday, November 06, 2002 4:57 PM
To: mono-list@ximian.com
Subject: Re: [Mono-list] Mono/Java interop?


RH> There are some notes on such a beast at http://www.go-mono.com/java.html
RH> On that same page there is also a link to a project (
RH> http://jilc.sourceforge.net/ ) to implement a java IL translator, but
RH> development seems to have stalled.

Very interesting. Unfortunately that's all about running Java as CIL
bytecode. But like Gonthier, I would be more interested in a
Java/.Net bridge then an IL translator.

I would like to instantiate Java classes from .net code, but they
should keep running on the Java VM. The more dynamic, the better. Like
I am able to load an assembly at runtime, I'd like to load a java
class at runtime and instantiate classes and call methods and so
forth.

We are building client/server apps that communicate through Java RMI.
That's super efficient. The distributed garbage collection is a dream.
It also makes development very easy, because the network layer is so
transparent. But some of our customers don't like our Java GUIs. They
prefer native windows front-ends. Wouldn't it be great if we could
build the GUI in .NET and use the client side Java classes that talk
to the server just as they are ?

Of course, I would also go with an IL translator, if it really works
for all Java classes. But I doubt that this is an easy task. I can
imagine, there is a lot of system depending code in the JDK core
classes (somewhere they have to talk to the underlaying system), which
can't be IL transformed. I am no VM expert though. This might not be
an issue. Somebody please correct me if this is wrong.

Also, with a bridge I would never have to worry about my java CIL code
not behaving exactly like the java bytecode. Of course a bridge would
be less efficient. But for some applications this is not a real issue.

I was playing around with the Java/COM bridge some time ago. Very
nice. But I read they stopped supporting it. Also, I hate the idea of
going through COM to reach .Net.

I would like to hear more about this topic [even though that might be
Mono off-topic]...
Norbert



_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list