Why doesn't Sun do a C# to Java byte code compiler?

后端 未结 18 1867
清酒与你
清酒与你 2021-02-01 01:20

We Want to Run Our C# Code on the JVM

My company has a large C# code base. Well over half of this code is our core engine for creating, reading, modifying, calculating

18条回答
  •  后悔当初
    2021-02-01 02:04

    Expose your .NET API as ASMX web services and you should be good to go.

    EDIT: For more heavy-usage scenarios, it would be worth looking into Windows Communication Foundation (WCF). This has built-in, configurable support for security, streaming, different transport scenarios (HTTP, TCP/IP, local named pipes). You are not restricted to SOAP message encoding, but that would probably be the easiest way to interop with Java.

    I'm not too sure about your exact scenario, but if you're dealing with large files and the .NET code and Java code are both running locally, you can just save the file to the user's hard drive using .NET and then fetch it from your Java app.

提交回复
热议问题