Eclipse - Extract/package the required libraries into the same Runnable JAR

大憨熊 提交于 2019-12-21 07:09:20

问题


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

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?

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.

Thanks!


回答1:


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.



来源:https://stackoverflow.com/questions/6615634/eclipse-extract-package-the-required-libraries-into-the-same-runnable-jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!