开发者

Write in Java to work with .Net?

开发者 https://www.devze.com 2023-03-05 10:08 出处:网络
I was wondering if anyone have experience writing codes in Java while compiling it into .Net assemblies? What are your thoughts? What library did you use to do so and what are the disadvantages of cod

I was wondering if anyone have experience writing codes in Java while compiling it into .Net assemblies? What are your thoughts? What library did you use to do so and what are the disadvantages of codes in Java to become .开发者_Python百科Net application?

I see there are a couple of libraries out there that help out with Java <-> .Net communication (eg. JNBridge http://www.jnbridge.com/, IKVM.NET http://www.ikvm.net/) .

Let me know if you have suggestions on how to go about doing this task, or may be a reason to why not bother doing it and better off starting out with .Net (C# may be)


I would suggest that you are almost certain to be better off starting with C#, unless you are doing a straight port and are ready to deal with lots of integration issues. C# is pretty similar to Java syntactically and conceptually, and the .NET tooling will work with it a lot better.


I wrote my own native JNI bridge from Java to .NET since we couldn't buy one off the shelf. It worked but it was extremely painful to get right. The path of least resistance with Java/.NET integration is to use a web-service (IMHO). This way you can do your Java things in Java and your .NET things on .NET.

0

精彩评论

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

关注公众号