none
Using .Net Core Libraries in Java Programs on Linux RRS feed

  • Question

  • Hi,

    Does anyone have any ideas for how to use .Net Core dlls in Java programs on Linux?

    Thanks!

    Croix


    g

    Wednesday, November 1, 2017 4:02 PM

All replies

  • Either with JNI using C/C++ code as bridge, or host .NET Core code in webservice and let Java call it.

    The first one would probably provide better performance, but the second one will be easier to write.

    EDIT: Seems WCF server side hosting for .NET Core is not implemented yet. If you want to see it be implemented, please vote.

    That means JNI seems to be the only way that will work.

    Thursday, November 2, 2017 7:33 AM
    Answerer
  • Hi Croix,

    Thank you for posting here.

    For your question, you could use Mono to compile your C# classes on the Linux platform of your choice and use JNI to write a set of facade classes between your java code and the compiled C# code.

    Maybe you could try IKVM.NET as well. It is an implementation of Java for Mono and the .NET.

    Best Regards,

    Wendy

    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 

    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet. 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, November 3, 2017 6:13 AM
    Moderator
  • Regarding IKVM.NET, note that after the main developer has quitted the project, there aren't anyone pick it up yet..

    And for Mono, the HTTP basic binding that Java uses is not planned to be implement yet, so it's no go.

    Friday, November 3, 2017 6:58 AM
    Answerer
  • Hi Croix,

    Have you solved your problem?

    If you solved your problem, please mark the useful reply as answer. This will make answer searching in the forum and be beneficial to community members as well.

    If you have something else about this issue, please feel free to contact us.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 16, 2017 2:47 PM
    Moderator