简体   繁体   中英

Calling methods C#.NET from JAVA

I have a dll created out of a C#.NET project and I would like to call the methods from a java program. I was wondering as to what sort of opportunities exist to accomplish this and then I came across JNA and JNI. Which one should I use for my purpose? Any suggestions? All I need is to call the methods in a class written using C#.NET and process the results from my Java program.

It would depend on your application, But you could place the C# DLL within a service eg WCF and expose the functionality to the Java code that way. Using wsimport to generate your client code within Java.

It saves the need to use cross over tools like JNI...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM