英文:
Creating Executable Jar with Ant Script Generated from Eclipse
问题
我从Eclipse中的Java项目导出一个可运行的jar文件,并勾选了“另存为Ant脚本”选项,并为build.xml指定了位置。
当我使用从导出生成的Ant脚本时,jar文件被构建了,但其大小几乎是直接从Eclipse导出时的两倍。
我尝试过在Eclipse内部和从命令行中运行生成的Ant脚本,结果相同。
在Eclipse中,jar文件大小为6.6M,而使用脚本时为10.6M。
Eclipse 4.15.0
Ant 1.9.15
英文:
I export a runable jar file from my Java project in Eclipse and I check the "Save as Ant script" box and give it a location for the build.xml.
When I use the Ant script produced from the export, the jar file is built but it is almost twice the size as the jar file produced when I exported it from Eclipse directly.
I tried both running the Ant script from within Eclipse and from the command line with the same result.
From Eclipse the jar is 6.6M and using the script it is 10.6M
Eclipse 4.15.0
Ant 1.9.15
专注分享java语言的经验与见解,让所有开发者获益!
评论