简体   繁体   English

如果特定库在 Java 构建路径中,如何检查 Eclipse?

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

Sometimes I want to check if a particular JAR is in build path by right-clicking on the project -> Properties -> Java Build Path -> Libraries有时我想通过右键单击项目 -> 属性 -> Java 构建路径 -> 库来检查特定 JAR 是否在构建路径中

So here is the list I need but i miss a way to search a particular library by name like Ctrl+F.所以这是我需要的列表,但我错过了一种按 Ctrl+F 等名称搜索特定库的方法。 I have to look the whole (unsorted!) list of hundreds of JARs instead.我必须查看整个(未分类!)数百个 JAR 的列表。 Is there a more comfortable way?有没有更舒服的方法? I couldn't find one so far.我至今找不到一个。

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.如果您使用的是 Maven,则打开“pom.xml”文件并单击编辑器视图底部的“Dependency Hierarchy”选项卡。 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.如果您使用的是 Gradle,那么可能有类似的方法,但我不熟悉 Eclipse 的 Gradle 插件。

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.如果您没有使用任何依赖管理工具,例如 Maven 或 Gradle,而是手动添加所有 JAR,那么我建议您切换到一个,因为它们还有许多其他优点。

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

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