如何为 J2ME 编译 bouncycastle 轻量级 API
我无法使用包中包含的 ant 构建脚本文件来编译 bouncycastle leightweight API。我已经在“crypto_env.properties”中设置了WTK的路径,但没有成功。有其他人能够编译它吗?如果可以,如何编译?
编辑:
我查看了 bouncycastle 包附带的 ant 构建脚本,并尝试制作自己的构建脚本。不过,我的构建脚本(如下)导致构建错误。
<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>
I haven't been able to compile the bouncycastle leightweight API with the ant build script file included in the package. I have set the path to WTK in "crypto_env.properties" but without success. Have anybody else been able to compile it and if so, how?
EDIT:
I have peeked at the ant build script shipped with the bouncycastle package and tried to make my own build script. My build script (which follows) results in build error, though.
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否已阅读常见问题解答中的第 3 项?
Have you read item number 3 in the FAQ?