[英]Calling a Java API from .NET - best approach
I need to call an API that's all in java from an existing .NET codebase. 我需要从现有的.NET代码库中调用java中的所有API。 What's the best approach here?
这里最好的方法是什么? Writing a webservice in java that basically just forwards the calls to the API - or going with something like JNI4NET ?
在java中编写一个web服务,基本上只是将调用转发给API - 或者像JNI4NET这样的东西 ?
You can use jni4net , which is a JNI bridge between .Net and Java. 您可以使用jni4net ,它是.Net和Java之间的JNI桥。 (Props to Darin Dimitrov for providing this info in an answer to another question.)
(向Darin Dimitrov道具提供此信息以回答另一个问题。)
That depends. 那要看。 If it is a desktop application, you can use JNI.
如果是桌面应用程序,则可以使用JNI。 But for a web based application you have to use the web services.
但对于基于Web的应用程序,您必须使用Web服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.