Search code examples
c#javapinvoke

Call Java Method from API in .NET


I have a Java API in jar file with some dependencies from other jar files.

Is there any way to call a specific method from this API, like using PInvoke from .NET?


Solution

  • 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)