I have a dll namely开发者_如何学运维 product.dll
created using .NET. How can I access that dll's constructor or method using Java code.
You may take a look at jni4net which allows interoperability between the two. IKVM.NET is another alternative. Yet another option is to expose the functionality you have in the .NET library as a SOAP web service which is interoperable and could be consumed from a JAVA client.
There is a commercial product called JNBridgePro that will allow you to easily do this. You can even run the .NET dll inside the Java process if you like. (You can also run the Java and .NET in separate processes and communicate through sockets.) For more information, please see www.jnbridge.com, or contact us at the e-mail address on the Web site. (Yes, I am with JNBridge, but I felt that mentioning the product was appropriate in these circumstances.)
精彩评论