[Mono-list] Mono/Java interop - Usage scenarios

Zaphod j0k3rin@yahoo.co.in
Tue, 12 Nov 2002 19:24:17 +0530


On Tue, Nov 12, 2002 at 12:20:21PM -0000, Ben Hutchison wrote:
> My understanding is that Java bytecode -> CIL would be much more
> feasible than the reverse. Roughly, CIL has a superset of Java
> capabilities. 

IMHO that has a slight feel of "easy to do" around it ... But don't
be fooled ... People have been discussing interop with Java on dotgnu
list since last September ... JILC came out of such a discussion IIRC.
I'm sad that it has sort of disappeared .... 

> IMO the bytecode transformation process would not be particularly
> difficult to implement. MS have done it for their JUMP and Visual J#
> products.

Hmm... by that logic writing a CLR JIT should not be that hard ... 
"MS has done it for their .NET runtime" .... How easy is it to fall 
into that trap. MS has had a fast JVM (like) runtime for the past 4 years 
before they started on JUMP and J# ... And they have $$$ and the best
people money can buy... open source just cannot get there that fast.

> Note that such a bytecode converter might be used on-the-fly like a JIT
> if it was sufficient fast.

Hmmm.... interesting ... I've been following both Mono and Portable.Net
for some time .... Writing a JIT for JVM does not seem to jell with the
Mono idea ? ... Pnet guys seem to have a plugin API for the runtime for
new bytecodes , but they seem to be talking about supporting Parrot ...
and not JVM (a register VM would be tougher right ?)..

> 2. Transform Java source code into C# (possibly the reverse)
> 
> If a developer has some Java or C# source that they wish to use in a
> foreign system long-term, they will want to convert the source code to
> maintain it. Having a binary only converter (1) is not sufficient.

How about a Java.Net compiler .... I'm hearing rumblings about one 
lately ... But well, I don't think that guy is good enough to deliver
a full Java to .NET compiler anytime soon...

Or a C# -> JVM compiler ? ... IIRC Portable.Net has a nice JVM output
feature .. But I have never been able to run any class files it generates.
t3rminator told me that there's some bug with their assembler or something 
...

Oh, but I forgot you all are talking about Mono/Java interop and not .NET/Java
.... Well hopefully it will work out right..