[Mono-list] Java / Mono Interop

Ralph Mason ralph.mason at telogis.com
Wed Aug 24 20:36:50 EDT 2005


Rodrigo B. de Oliveira wrote:

>On 8/24/05, Ralph Mason <rm.monolist at telogis.com> wrote:
>  
>
>>Hi,
>>
>>I am wanting to make a .net assembly callable from Java.
>>
>>My Ideal world would be a tool that takes the .net assembly and uses
>>reflection to generate Java proxies and JNI code to call mono.  Some
>>attributes added in the c# code would direct the tool on what to expose etc.
>>    
>>
>
>I was considering the same problem some weeks ago.
>
>I'm assuming you already know about ikvm and decided it won't work for
>your case because you cannot dictate the virtual machine the java side
>of the application will run on. If you don't know about ikvm, pls
>visit http://ikvm.net and make up your mind first.
>
>  
>
Looked at IKVM, and it's great if you want to use Java components from 
.net but not so good the other way around.  I am trying to interoperate 
with Java apps and I get the feeling they wouldn't take too nicely to me 
saying, fine but you have to run your java app on the mono VM.  So that 
is a non starter.

The Mainsoft seems like a solution but it's runtime license at $2.5k per 
machine is an order of magnitude or two more than this project could 
stand per machine.

>The sad part is that I could not find anything readily useable.
>Grasshopper seemed to go in that direction but failed to install
>because I didn't have IIS on my machine (: really scary.
>
>I'm currently using sockets to send information from the java side to
>the mono side and back. I'm considering to switch to something more
>structured like xmlrpc or something.
>
>  
>
This is a possibility but the performance sounds like it would be pretty 
bad.

>>Does anyone know of such a tool?  If there isn't one, can anyone comment
>>on the difficulty of making one (I know very little about Java).
>>
>>    
>>
>As someone that have written a JNI->COM layer before I can say that
>it's not really difficult but still a lot of work and love to get it
>running and compiling in all supported platforms.
>
>  
>
So a JNI->dotnet layer should be simple right?

>I would certainly consider contributing to such a project...
>  
>
Another Idea, anyone know much about swing internals, how much work 
would it be so that swing could make bindings to mono calling a .net 
assembly?



Thanks for your thought
Ralph


More information about the Mono-list mailing list