在Eclipse中自动将项目构建到JAR中 [英] Build project into a JAR automatically in Eclipse

查看:150
本文介绍了在Eclipse中自动将项目构建到JAR中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Eclipse项目,我想自动将我的Java项目内置到JAR中。我知道我有选择将项目导出到JAR中;如果我右键单击;但我真正寻找的是,像Eclipse自动构建一个项目的 .class 文件并将它们放在目标文件夹中;它还应该自动构建一个JAR并在某些或某个特定位置复制最新的JAR。



有没有一个选项来配置Eclipse,以便自动构建JAR ?



只是为了让家长清楚,有足够的耐心回答我的问题;我不把ANT看作是解决方案;因为我已经在使用它了,但是我想要的是一些可以自动启动的时间触发器或立即生成的变化。

解决方案

查看 Apache Ant



可以使用Ant进行自动构建与eclipse,这里是如何


I have an Eclipse project where I want to keep my Java project built into a JAR automatically. I know I have an option to export the project into a JAR; if I do a right click; but what I am really looking for is, that like Eclipse automatically builds a project's .class files and put them in target folder; it should also build a JAR automatically and copy the latest JAR at some or a specific location.

Is there a option to configure Eclipse in such a way, to build JARs automatically?

Just to make it clear for guys, patient enough to answer my question; I am not looking at ANT as solution; as I already use it, but what I would like it something that gets initiated automatically either with a time based trigger or immediate build with change.

解决方案

Check out Apache Ant

It's possible to use Ant for automatic builds with eclipse, here's how

这篇关于在Eclipse中自动将项目构建到JAR中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆