Eclipse - 将所需的库提取/打包到相同的Runnable JAR中 [英] Eclipse - Extract/package the required libraries into the same Runnable JAR

查看:236
本文介绍了Eclipse - 将所需的库提取/打包到相同的Runnable JAR中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用Eclipse将项目导出为Runnable JAR文件时,有三种选择:

When exporting a project as a Runnable JAR file using Eclipse, there are three choices:

1. Extract required libraries into generated JAR
2. Package required libraries into generated JAR
3. Copy required libraries into a sub-folder next to the generated JAR

但是,似乎只能从Runnable JAR文件导出窗口中选择三个选项之一。我想知道是否有一些方法可以混合这些方法,例如,在打包其他文件时提取一些文件?

However, it seems that only one of the three choices could be chosen from the Runnable JAR File Export window. I wonder if there are some ways that could mix up these methods, e.g., extracting some of the files while packaging the rest?

注意:我需要这个,因为我的一个JAR文件包含大量对其他文件的引用,所以1不能是一个选项,我恐怕2可能会对我造成一些问题。

Note: I need this since one of my JAR file contains a ton of references to other files so 1 cannot be an option, and I am afraid that 2 might be causing some problems for me.

谢谢! p>

Thanks!

推荐答案

你可以做的是选择1.将所需的库提取到生成的JAR中,并将构建保存为Ant脚本。然后完成后,编辑ant脚本并删除不想提取的库。

What you can do is choose "1. Extract required libraries into generated JAR" and save the build as an Ant script. Then after it finishes, edit the ant script and remove the libraries that you do not want to be extracted.

这篇关于Eclipse - 将所需的库提取/打包到相同的Runnable JAR中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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