此操作可分如下几步:
1:生成jarbao:
jar cf myName.jar *.class
2:生成打包所需配置文件:build.xml:
<project name="MyProjectname">
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler" />
<target name="bundle">
<jarbundler dir="release"
name="appname"
mainclass="mainclassname"
jar="jarfilename.jar"
icon="iconfilename.icns" />
</target>
</project>
3: jar包、xml文件置于统一目录下,再在该目录下生成release目录
4:安装打包所需工具:jarbundler-2.2.0.jar[http://informagen.com/JarBundler/]至目录:/usr/share/ant/lib/下
5:ant bundle
此文原创,转载请附带:http://www.cnblogs.com/xuvw/archive/2013/06/18/3142935.html