如何为J2ME编译bouncycastle leightweight API

时间:2011-03-16 16:03:42

标签: api compilation java-me bouncycastle

我无法使用包中包含的ant构建脚本文件编译bouncycastle leightweight API。我在“crypto_env.properties”中设置了WTK的路径,但没有成功。有没有其他人能够编译它,如果是,如何编译?

编辑:

我已经看过bouncycastle包附带的ant build脚本,并试图制作我自己的构建脚本。但是,我的构建脚本(后面的内容)会导致构建错误。

<project name="midp" default="compile" basedir=".">
  <property name="wtk" location="/WTK2.5.2_01"/>
  <property name="src" location="src"/>
  <property name="build" location="build"/>

  <target name="clean">
    <delete dir="${build}"/>
  </target>

  <target name="init">
    <mkdir dir="${build}"/>
  </target>

  <property name="midp-api-jar" value="/${wtk}/lib/midpapi20.jar"/>

  <path id="classpath">
    <pathelement location="${midp-api-jar}"/>
    <pathelement location="/${wtk}/lib/cldcapi10.jar"/>
  </path>

  <patternset id="java-namespace-set">
    <include name="java/**/*.java"/>
  </patternset>

  <target name="compile" depends="init">
    <javac srcdir="${src}"
           destdir="${build}"
           bootclasspath="${midp-api-jar}"
           includeAntRuntime="no"
           includeJavaRuntime="no"
           debug="off"
           optimize="off">
      <patternset refid="java-namespace-set"/>
      <classpath refid = "classpath"/>
    </javac>
  </target>
</project>

1 个答案:

答案 0 :(得分:1)

您是否阅读了FAQ中的第3项?