如何在Eclipse中检查特定库是否位于Java构建路径中?

huangapple go评论61阅读模式
英文:

How to check in Eclipse if a particular library is in Java build path?

问题

有时候我想通过右键单击项目 -> 属性 -> Java构建路径 -> 库 来检查特定的JAR包是否在构建路径中。

所以这是我需要的列表,但是我缺少一种像Ctrl+F这样按名称搜索特定库的方法。我必须查看成百上千个JAR包(无序!)的整个列表。有没有更方便的方法?到目前为止我还没有找到。

英文:

Sometimes I want to check if a particular JAR is in build path by right-clicking on the project -> Properties -> Java Build Path -> Libraries

So here is the list I need but i miss a way to search a particular library by name like Ctrl+F. I have to look the whole (unsorted!) list of hundreds of JARs instead. Is there a more comfortable way? I couldn't find one so far.

答案1

得分: 0

你是如何将这些库包含在你的项目中的?如果你在使用 Maven,那么打开 "pom.xml" 文件,点击编辑器视图底部的 "Dependency Hierarchy" 选项卡。然后会显示一个包含所有库(依赖项)的树状结构,视图顶部有一个 "filter" 输入框。

如果你在使用 Gradle,可能有类似的方法,但我对 Eclipse 的 Gradle 插件不太熟悉。

如果你没有使用任何类似 Maven 或 Gradle 的依赖管理工具,而是手动添加所有的 JAR 文件,我建议你考虑切换到其中一个,因为它们还有许多其他优点。

英文:

How are you including the libraries in your project? If you are using Maven, then open the "pom.xml" file and click on the tab "Dependency Hierarchy" at the bottom of the editor view. There then will be a tree of all libraries (dependencies) used with a "filter" input at the top of the view.

If you are using Gradle, then there may be a similar way, but I'm not familiar with the Gradle plugin for Eclipse.

If you aren't using any dependency management tool such as Maven or Gradle, but are adding all the JARs manually, then all I would recommend switching to one, because they have many other advantages, too.

huangapple
  • 本文由 发表于 2020年9月9日 16:59:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/63808226.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定