Conversion of jar to dll using ikvm

前端 未结 4 1604
醉梦人生
醉梦人生 2020-12-15 01:58

I am trying to convert a jar into dll in dotnet using IKVM but am getting this error Exception in thread \"main\" java.lang.ClassNotFoundException: \\Location of the jar\\..

4条回答
  •  再見小時候
    2020-12-15 02:22

    First, create a new Bindings Library project. In Xamarin Studio or Visual Studio, create a new Solution and select the Android Bindings Library template.

    The template includes a Jars folder where you add your .JAR(s) to the Bindings Library project. Right-click the Jars folder and select Add > Existing Item:

    Navigate to the .jar file downloaded earlier, select it and click Add:

    Verify that the .jar file was successfully added to the project:

    right click your jar file=>properities =>choose embedded jar

    Set the build action to EmbeddedJar:

    EmbeddedJar – the .JAR will be embedded in the Bindings Library.

    Set the target API level for your Bindings Library

    Finally, build the Bindings Library. Although some warning messages may be displayed, the Bindings Library project should build successfully and produce an output .DLL at the following location:

    Projectname/bin/Debug/JarBinding.dll

    Reference

    https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/

提交回复
热议问题