简体   繁体   English

Eclipse如何打印缺少的库

[英]Eclipse how print missing libraries

I have many missing libraries in a Java Eclipse (3.7.2) project. 我在Java Eclipse(3.7.2)项目中缺少许多库。 Is there any way of copying the list of libraries, to paste into a document for editing? 有什么办法复制库列表,粘贴到文档中进行编辑?

You can select the errors in the "Problems View" and copy them. 您可以在“问题视图”中选择错误并进行复制。 Eclipse will put a pure-text version into your clipboard which you can then paste into an Editor. Eclipse会将纯文本版本放入剪贴板,然后您可以将其粘贴到编辑器中。

If you have a working project and want to copy libraries from there, open the (hidden) .classpath file. 如果您有一个正在运行的项目,并且想要从那里复制库,请打开(隐藏的) .classpath文件。 It's XML which you can copy&paste. 您可以复制和粘贴XML。 I haven't tried copy&paste from the "Build Path" dialog but maybe that works as well. 我还没有尝试过从“构建路径”对话框中进行复制和粘贴,但也许效果也不错。

While Eclipse may recognizes compile-time required dependencies that are missing i hardly doubt it knows runtime-required librarys (so no, eclipse and as faar as i know any other IDE does not support that unless dependency management is set up with for example Maven). 尽管Eclipse可以识别出缺少的编译时所需的依赖项,但我几乎不怀疑它知道运行时所需的库(因此,不知道,Eclipse和我所知道的那样,除非使用Maven设置依赖项管理,否则其他任何IDE都不支持)。 。

The librarys missed at compile time should show in the 'Problems' view of Eclipse. 编译时错过的库应该显示在Eclipse的“问题”视图中。

Window -> Show View -> "Problems" (select view 'Problems')

Once you have a tab with that view you can order the problems by its description and all of the 'missing library..." issues will be listed in a group. You will then be able to select according entrys and CTRL+C / CTRL+V them out of there. 在具有该视图的选项卡后,您可以通过其描述对问题进行排序,所有“缺失的库...”问题都将在组中列出。然后,您可以根据条目和CTRL + C / CTRL选择+ V他们离开那里。

Also note that in my case using maven eclipse oftenly thinks there are classes or dependencys missing by the fact eclipse is not that skilled when it comes to local synchronization of your workspace. 还要注意,在我的情况下,使用maven eclipse通常认为在工作区的本地同步方面,eclipse并不熟练,因此缺少类或依赖项。

Id rather invest that time to start adding missing dependencys or think about Maven for more proffessional dependency management. 我宁愿花时间去增加缺少的依赖,也可以考虑使用Maven进行更专业的依赖管理。

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

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