Use IKMV to convert a jar to a DLL and call it directly in. Net

Source: Internet
Author: User

Introduction to IKMV Encyclopedia

IKVM official website

Java must be installed before using IKVM.

The use of IKVM is relatively simple, to download IKVM required components to the official website, after decompression in path configuration%ikvm_home%\bin

Using commands in cmd Ikvmc-out:test.dll Test.jar can be test.dll in the current directory

In a C # project, refer to IKVM.OpenJDK.Core.dll, IKVM in the bin directory of IKVM. Runtime.dll, IKVM. Runtime.JNI.dll three DLLs, and then add Test.dll references in your project, you can use classes, methods, and so on in Test.jar.

For example:

Package Jartodlltest;public class Jartodll {public String returnstring () {        return "Hello, zht!";    }}

  

Called in. NET:

New Jartodlltest.jartodll (). Returnstring ()

Use IKMV to convert a jar to a DLL and call it directly in. Net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.