使用从Eclipse生成的Ant脚本创建可执行的Jar文件

huangapple 未分类评论48阅读模式
英文:

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

huangapple
  • 本文由 发表于 2020年5月29日 21:05:45
  • 转载请务必保留本文链接:https://java.coder-hub.com/62086709.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定