将外部库放入JAR? [英] Put external library to the JAR?

查看:74
本文介绍了将外部库放入JAR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的java项目中添加了一些外部库(在netbeans中).
是否可以将外部jar库放入Java存档(而不是将其放入单独的(例如)"lib"目录)?

I have added some external libraries to my java project (in netbeans).
Is it possible to put the external jar library to the java archive (and not to put them into a separate (for example) "lib" directory)?

推荐答案

当然可以.可以使用包含所有依赖项的捆绑罐"下载一些开源项目.
您需要提取所有jar,然后将其再次打包到一个文件中.
此处.

Of course you can. There are a few open source projects that can be downloaded with a "bundle jar" that contains all the dependencies.
You need to extract all the jars and then jar them again to one file.
An example of doing this with Ant can be seen here.

这篇关于将外部库放入JAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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