开发者

IKVM - Unable to convert a jar to dll

开发者 https://www.devze.com 2023-03-17 16:46 出处:网络
Team, Ia m using IKVM to convert a jar file to a dll, so that I can use it with C# to test the Java application...I dont have the original java source code or the class files.

Team,

Ia m using IKVM to convert a jar file to a dll, so that I can use it with C# to test the Java application...I dont have the original java source code or the class files. Here is what I am doing and the error I get:

ikvmc myApplication.jar

Note IKVMC0002: output file is "asapi.dll"
Warning IKVMC0100: class "org.apache.log4j.Logger" not found
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in "com.myApp.authenticateUser(LNote IKVMC0002: output开发者_开发问答 file is "asapi.dll"
Warning IKVMC0100: class "org.apache.log4j.Logger" not found
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in
vices.AsApi.authenticateWithArtifact(Ljava.lang.String;Lcom.myApp.AppApi)....

Any ideas? This jar file doesnt contain a main method...

Regards, Deekshit


I believe you need something more along the lines of:

/usr/bin/mono \
 /path/to/ikvm-0.42.0.6/bin/ikvmc.exe \
 /path/to/project/target/project-1.2.3.4.jar \
 -out:/path/to/project/target/project-1.2.3.4.dll \
 -keyfile:/path/to/project/target/private-key.snk \
 -assembly:project-1.2.3.4 \
 -fileversion:1.2.3.4 \
 -version:1.2.3.4

If your application depends on third-party jars, you might need to add them to the jar, using shading (not good practice at all).

0

精彩评论

暂无评论...
验证码 换一张
取 消