Call C# mono code from java under linux

I have somoe C# source code that I want to be available for java applications under linux OS.

How can I call some C# method from java code?

I have found http://www.mono-project.com/Java but this looks like writing java code in .net environment. It is not what I look for. Rather I need to create new java library that will expose all functionality from C# code, the new library must be executed in pure java environment. Maybe that is possible with IKVM I am not sure.


  • Use Mono to compile your C# classes on the Linux platform of your choice;
  • Use JNI to write a set of facade classes between your java code and the compiled C# code.

  • The closest tool I can find that might be useful would be JNI4Net

    I think you would still need Mono to run a .net framework on Linux as well.


    Your question is going to be closed (I voted too) simply because it would finally lead to a tool recommendation.

    Your best approach is to rewrite them in Java. Or alternatively, there are existing tools (commercial or free) to convert C# to Java,

  • CSharpJavaMerger Framework
  • RemObjects C# who compiles C# to JVM.
  • and many others
  • Mono is not something you should consider at this moment. Yes, IKVM.NET only helps running Java code on Mono/.NET, and it won't help you in your case.

    链接地址: http://www.djcxy.com/p/90074.html

    上一篇: 科尔多瓦:有没有办法来检测语音听写是否已在iOS上结束

    下一篇: 在Linux下调用java下的C#单声道代码