简体   繁体   English

如何在eclipse中自动检查/确保所有外部库是否包含lib文件夹?

[英]How to automatically check/ensure if all external libraries are included lib folder in eclipse?

I have to submit my homework assignments in a form of zipped eclipse project folders. 我必须以压缩的eclipse项目文件夹的形式提交我的家庭作业。 I just lost a few points in an otherwise solid program because some external libraries were missing in my submission. 我刚刚在一个非常可靠的程序中丢失了几点,因为我的提交中缺少一些外部库。 I looked in my project folder and cannot figure out what those libraries were. 我查看了我的项目文件夹,无法弄清楚这些库是什么。 Is there an option in eclipse that would automatically copy all external jars to the lib folder? 在eclipse中是否有一个选项会自动将所有外部jar复制到lib文件夹? Thanks! 谢谢!

The absolute best thing you can do is to test it. 你能做的绝对最好的事情就是测试它。 Open a new Eclipse workspace and import the project just as if you were receiving it from a student. 打开一个新的Eclipse工作区并导入项目,就像从学生那里接收它一样。

Also make sure you're not configuring your project to use any truly external libraries that are outside of the project folder, otherwise if you're still on the same machine, you may not notice that there's an issue. 另外,请确保您没有将项目配置为使用项目文件夹之外的任何真正的外部库,否则如果您仍在同一台计算机上,则可能不会注意到存在问题。 Store them in a "lib" folder underneath the project instead. 将它们存储在项目下的“lib”文件夹中。 (Do this from the start, rather than needing to worry about copying them in later. Do you have a specific need to be using external libraries in the first place?) (从一开始就这样做,而不是担心以后复制它们。你是否特别需要首先使用外部库?)

Alternatively, if your instructor is open to it - see if you can use a dependency management mechanism, such as Apache Maven. 或者,如果您的教师对它开放 - 请查看您是否可以使用依赖关系管理机制,例如Apache Maven。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM