Call C # dll from a Java Application

I have a dll created in C # that does some database operation when called. I need to pass some parameters from a Java application to a method in a dll. Any idea on how to do this.

OR

Any better ideas for calling a method in C # using a java application?

thanks

Edit: my Java application is a standard Dialogue Designer application from the AVAYA platform, and I developed a C # application that only works with the .net SDK only. Therefore, I need data that needs to be transferred from a java application to a .net application

+4
source share
2 answers

I looked into this some time ago, although I went far as the requirements have changed. But I read that using JNI's Java Native Interface can help you with what you need to do.

http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html

Hope this helps!

+1
source

IKVM.NET is a Java implementation for Mono and the Microsoft.NET Framework. It includes the following components:

  • Java virtual machine implemented in .NET
  • .NET implementation of Java class libraries
  • Java and .NET Interoperability Tools

The third point is what you are looking for.

The project website is here: http://www.ikvm.net/

+2
source

Source: https://habr.com/ru/post/1379447/


All Articles