Call C# dll from a Java Application

2019-01-28 05:25发布

I have a dll created in c# which does some database operation upon calling. I have to pass few parameters from a Java application to a method in the dll. Any Idea on how to do this.

OR

Any better ideas for calling a method in c# by a java application?

Thanks

Edit : My java application is a standard Dialogue Designer application from AVAYA Platform and I have developed a C# application which works on a SDK for .net only. So i need data to be passed from java application to .net application

标签: c# java .net dll
2条回答
成全新的幸福
2楼-- · 2019-01-28 05:50

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

  • A Java Virtual Machine implemented in .NET
  • A .NET implementation of the Java class libraries
  • Tools that enable Java and .NET interoperability

The third point is maybe what you are looking for.

Project Site here: http://www.ikvm.net/

查看更多
Bombasti
3楼-- · 2019-01-28 06:04

I looked into this a while back although I enver got far with it as the requirements changed. But I did read that using JNI, Java Native Interface may be able to help you with what you are needing to do.

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

Hope this helps!

查看更多
登录 后发表回答