java 依赖其他项目时如何导出,使用Eclipse将具有外部依赖性的Java项目导出到jar...

Is there an easy way to export a Java project including all of its external dependencies to a standard .jar file?

I have developed an SDK that uses several Apache libraries and I would like to be able to ship this project as a single jar. The answers I have found thus far to this question require the project to be packaged as a Runnable jar, and does not apply to this project which has no main class.

The rest of the answers I have found assume familiarity with Ant or Maven to accomplish this task, and I have no background with either. There are several scripts out there but I don't understand how I would use/modify them, or what I would to run the script and get a result.

Any answer that can provide more background into how exactly a user with no background with Ant or Maven would do these tasks is greatly appreciated.

For more background information I have trying to combine the following libraries into one called JetstreamSDK.jar

commons-codec-1.6.jar

commons-configuration-1.9.jar

commons-io-2.4.jar

commons-lang-2.6.jar

commons-lang3-3.1.jar

commons-logging-1.1.1.jar

httpclient-4.2.5.jar

httpcore-4.2.4.jar

JetstreamSDK-Java.jar

jibx-bind.jar

jibx-extras.jar

jibx-run.jar

xpp3.jar

解决方案

1.) First compile your project

2.) Right click on your PROJECT -> Export -> Java -> Runnable jar

3.) You will get a Dialog box, there select the class name (in which your main method resides)

4.) Give the export destination

5.) In library handling(radio button): select your desired option(all are self descriptive)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值