[Mono-list] Mono/Java interop?

Norbert Harrer Norbert Harrer <nharrer@gmx.at>
Wed, 6 Nov 2002 22:56:44 +0100


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