2017-01-09 18 views
0

.jar 라이브러리를 .dll으로 변환하고 IKVM 프레임 워크에서 작동하도록하는 데 어려움을 겪고 있습니다. 여러 Java 프로젝트에서 성공적으로 테스트되었으므로 잘 작동하는 Java 라이브러리를 작성했지만 .NET 용 .dll이 강력하게 필요합니다.IKVM jar to dll 문제

내가 명령을 실행하면 :

ikvm -jar mylib.jar 

모든 (: 작동 나는 또한 확신 할 수있는 홈페이지 파일을 시도) 확인입니다. 내가 입력

하지만, :

ikvmc -target:library mylib.jar 

내가 경고를 많이 가지고 있지만, 여전히 .dll 파일을 만듭니다. 모든 경고가 내 프로젝트에서 사용하지 않는 라이브러리와 관련되어 있다고 말하는 것이 중요합니다. 그러나 필자는 필자가 꼭 필요한 Maven에서 가져온 패키지에 포함되어 있습니다. 는 내가 그 경고를 무시 온라인으로 읽을 수 있기 때문에 진정한 문제는이 단계에 있는지 모르겠지만, 내가 출력의 약간의 게시 확인하기 위해 :

warning IKVMC0100: Class "junit.framework.TestCase" not found 
warning IKVMC0100: Class "javax.servlet.http.HttpServlet" not found 
warning IKVMC0100: Class "javax.servlet.ServletOutputStream" not found 
warning IKVMC0100: Class "org.junit.Assert" not found 
warning IKVMC0100: Class "junit.framework.TestSuite" not found 
warning IKVMC0100: Class "org.apache.tools.ant.taskdefs.MatchingTask" not found 

것은 우리가이 단계가 괜찮 가정하자를 이제는 IKVM 라이브러리와 mylib.dll 파일을 에 가져와야합니다. 참조의 C# app. 내가 한 결과는 꽤 이상합니다. 자동 완성 환경에서는 다른 클래스의 99 %를 무시하고 4 개의 Java 클래스 만 사용하도록 제안합니다. 나는 무언가 잘못되었다고 생각하지만, 어디서 어떻게 고쳐야하는지 이해하기가 어렵습니다.

더 많은 정보 : 저는 Maven, Java8 (sdk 1.8) 및 IKVM 8을 사용하고 있습니다. IKVM 7에서도 같은 오류를 시도했지만 여전히 동일한 오류가 발생했습니다.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>org.fra.mylibrary</groupId> 
<artifactId>MyLibrary</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<name>MYLIBRARY</name> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
</properties> 

<!-- https://mvnrepository.com/artifact/net.sourceforge.owlapi/owlapi-distribution --> 
<dependencies> 
    <!-- https://mvnrepository.com/artifact/net.sourceforge.owlapi/owlapi-distribution --> 
    <dependency> 
     <groupId>net.sourceforge.owlapi</groupId> 
     <artifactId>owlapi-distribution</artifactId> 
     <version>4.1.3</version> 
    </dependency> 
    <!-- https://mvnrepository.com/artifact/org.antlr/antlr4-runtime --> 
    <dependency> 
     <groupId>org.antlr</groupId> 
     <artifactId>antlr4-runtime</artifactId> 
     <version>4.5.3</version> 
    </dependency> 

    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple --> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-simple</artifactId> 
     <version>1.7.21</version> 
    </dependency> 

    <!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all --> 
    <dependency> 
     <groupId>org.codehaus.groovy</groupId> 
     <artifactId>groovy-all</artifactId> 
     <version>2.4.7</version> 
    </dependency> 

    <!-- https://mvnrepository.com/artifact/net.sourceforge.owlapi/jfact --> 
    <dependency> 
     <groupId>net.sourceforge.owlapi</groupId> 
     <artifactId>jfact</artifactId> 
     <version>4.0.4</version> 
    </dependency> 



</dependencies> 

<build> 
    <plugins> 
     <!-- ANTLR4 --> 
     <plugin> 
      <groupId>org.antlr</groupId> 
      <artifactId>antlr4-maven-plugin</artifactId> 
      <version>4.5.3</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>antlr4</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
      </configuration> 
     </plugin> 

     <!-- Maven Assembly Plugin to create Jar --> 
     <plugin> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <executions> 
       <execution> 
        <phase>package</phase> 
        <goals> 
         <goal>single</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <descriptorRefs> 
        <descriptorRef>jar-with-dependencies</descriptorRef> 
       </descriptorRefs> 
      </configuration> 
     </plugin> 

     <!-- Maven Compiler Plugin --> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.6.0</version> 
      <configuration> 
       <source>1.8</source> 
       <target>1.8</target> 
      </configuration> 
     </plugin> 

    </plugins> 
</build> 

답변

0

은 그냥이 작동, 방법 및 클래스의 최신 버전과 관련된 모든 코드를 제거하고 자바의 라이브러리의 버전을 낮출 변경 : 결국 이 내 pom.xml 파일입니다 같은 오류가있어서