eclipse 用ant 进行打jar 包

eclipse  已经集成了ant 所以用起来还是很方便的   不用再自己去写build.xml  了,所以简单很多

下面开始打包啦:

1、eclipse 用ant 进行打jar 包

在你的项目上右键 选择export 

eclipse 用ant 进行打jar 包

2、在小框框中输入ant 会搜索出 ant buildfiles  选中他,点击next 

eclipse 用ant 进行打jar 包

在这里选择你自己的项目,点击finish

eclipse 用ant 进行打jar 包

然后就可以看到你项目中多出了一个build.xml  文件

这就是eclipse 帮你生成的ant 的build.xml 

3、添加build.xml 进行打包

 、、eclipse 用ant 进行打jar 包

点击window -->选择show view -->选择ant 

eclipse 用ant 进行打jar 包

如果show view 没有ant ,点击other 输入 ant 进行搜索  选择ant 点击ok

eclipse 用ant 进行打jar 包

弹出ant 的视图

4、点击小蚂蚁的图标 或者 在空白处右键-->add buildfiles

eclipse 用ant 进行打jar 包

选择你需要打jar 的项目中的build.xml 点击ok

eclipse 用ant 进行打jar 包

添加完成

eclipse 用ant 进行打jar 包

5、双击build   ,然后就坐等就可以了;看到控制台输出 BUILD SUCCESSFUL 恭喜你打包完成

eclipse 用ant 进行打jar 包