[Mono-list] .NET ORB using Java

Mark Gimelfarb mark@dawebber.com
Wed, 12 May 2004 23:00:18 -0500


Yet another solution:
Get JLCA from here:
http://msdn.microsoft.com/vstudio/downloads/tools/jlca/
convert the code to C# and compile it under Mono. 
This is the way I've gotten os-ohio (os-ohio.sourceforge.net) converted to C#.
I'm not going to tell you that you won't have to do some manual labor, but it's 
very small relative to having to rewrite it from scratch. 

Also, ikvm can run a lot of java programs w/o recompiling or converting them to 
CLR-compliant language, as Jonathan indicates. For instance, I'm running James 
under IKVM for some time now. Not that I don't have a JRE on my box, it's just 
so cool :)

Regards,
         Mark.



Quoting Jonathan Pryor <jonpryor@vt.edu>:

> On Wed, 2004-05-12 at 03:37, Vibhu Sharma wrote:
> > Hi
> > 
> > Here is what we are thinking of doing...
> > 
> > 0. Take a Java implementation of some ORB - say OpenORB.
> > 1. Take the sources [.java files] and compile them in J# to get a .NET
> > implementation.
> 
> Alternate solution: Compile the .java files with a *real* Java compiler,
> and use the Java .class files from .NET.
> 
> You can do this by using IKVM.NET; see: http://www.ikvm.net.  They
> provide a Java VM for .NET.
> 
> >         1.1 this would be JDK 1.1.4 compatible - so somethings may not
> > work.
> 
> Exactly, which is one reason to prefer IKVM.
> 
> >         1.2 Does Microsoft have any plans to upgrade J# to support
> > Java 2? [especially JDK 1.4 and above]?
> 
> Mono can't speak for Microsoft, but I would imagine that the answer is
> NO.  (Not just "no", but NO.)  Why?  Microsoft doesn't have a license to
> Java 2, only to Java 1.1.x.  I can't see this changing any time soon.
> 
> >                 1.2.1 We don't really care for swing etc at this stage
> > - i.e no UI related stuff is needed
> >                 1.2.2 We also don't care about RMI, JNI etc. for this
> > particular task
> >         1.3 Has there been some work done on above? 
> 
> IKVM.NET?
> 
> >         Once the ORB is built, this would essentaily be a .NET
> > assembly [.dll] targetting the CLR rather than being a .jar targeting
> > a JVM
> > 
> > 2. We can then do IDL2Java to get the .java files.
> > 3. Recompile these stubs using J# to create yet another .NET assembly
> >         - in case this piece requires changes, would be painful
> > because you wont want to edit and recompile the stubs everytime
> > 
> > 4. We can then use any .NET compliant language like C# to write the
> > clients in.
> > 
> > 5. On Mac OSX, we would be doing Cocoa development, so UI in Objective
> > C and non-UI in Java [using OpenORB], and since both support Cocoa,
> > life would/should be simpler.
> > 
> >         - this means no mono or CORBA remoting needed.
> 
> Huh?  Doesn't an ORB imply CORBA remoting?  Or did I miss something?
> 
> >         - may not be a popular thought for this forum, but please let
> > me know if this has been tried and if there are some pitfalls related
> > to this.
> 
> Well, there's always Remoting.Corba...
> 
> Personally, I'd go for SOAP.  Everything supports that, including
> AppleScript (IIRC), and it's fairly easy (trivial?) to write an ASP.NET
> web service that talks SOAP.  Of course, I'm not privy to all you're
> trying to do, so...
> 
> You might also try IKVM.NET.  It uses GNU Classpath to provide its Java
> class library, so not all required functionality may be available.
> 
>  - Jon
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>