开发者

run c# code in java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

开发者_JAVA百科

Closed 7 years ago.

Improve this question

I have a code which is written in c#, how can I run it in java code??

Thanks


The ikvm project is a JVM written in .net - designed to allow Java and .net interoperability.


If it is a small chunk of code, I'd recommend rewriting it.

If it is a large chunk of code, I'd recommend:

  • wrapping it as a command and running it using System.exec(), or
  • turning it into a service and making requests using HTTP, a common RPC protocol or plain sockets.

Only if neither of those approaches were technically feasible would I consider something like JNI or IKVM.


Take a look at JNBridgePro (www.jnbridge.com), which is specifically designed to tightly integrate .NET and Java code.

Disclosure: I work for JNBridge.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜