I have a Java API in jar file with some d开发者_运维问答ependencies from other jar files.
Is there any way to call a specific method from this API, like using PInvoke from .NET?
Here you go :) I've used it myself and was very please with the implementation.
IKVM: Using Java API's in .NET Applications
(1) If you just want some libraries from Java.
(2.1) If you have access to the code.
(2.2) Last resort, dynamically load the Java into .Net (interpreter)
I don't think it will be an easy task to interoperate .net and java. May be you could use sockets, and use them to send messages from one environment to another. It is just an idea, though.
EDIT:
I have found some libs that say they can do this:
http://www.jnbridge.com/
http://www.codeproject.com/KB/dotnet/Espresso.aspx
You can use CORBA to "call" java methods from .NET.
For .NET here you can find some CORBA libraries.
Java SDK includes CORBA capabilities so you don't have to download 3rd party libraries.
精彩评论