java - 查找类名冲突和 jar 文件版本差异和冗余

标签 java class loading conflict

大多数时候,开发人员将很难调试与类加载问题相关的问题,原因如下

1 。类路径可能有两个不同的 jar,同一个类有不同的版本。 2.类加载问题。

虽然我们可以使用 jar 实用程序深入研究每个 jar ,但这将非常繁琐且容易出错。

是否有解决此类问题的工具或机制。 虽然类加载在现实中并不简单,但说说weblogic将如何对特定的ear文件进行类加载。

最佳答案

尝试tattletale ,它在 ant 和 maven 中都有效:

The tool will provide you with reports that can help you

  • Identify dependencies between JAR files
  • Find missing classes from the classpath
  • Spot if a class/package is located in multiple JAR files
  • Spot if the same JAR file is located in multiple locations
  • With a list of what each JAR file requires and provides
  • Verify the SerialVersionUID of a class
  • Find similar JAR files that have different version numbers
  • Find JAR files without a version number
  • Find unused JAR archives
  • Identify sealed / signed JAR archives
  • Locate a class in a JAR file
  • Get the OSGi status of your project
  • Remove black listed API usage

关于java - 查找类名冲突和 jar 文件版本差异和冗余,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1866548/

相关文章:

java - Spring Boot中使用多个数据源时如何设置多个连接池?

php - Laravel Eloquent 在不同连接上急切加载

java - 通过相对路径名加载图像

java - Web 服务 API - 请求用户授权 - 第一定时器

java - 静态数据结构

java - 代理私有(private)接口(interface)

python - 如何将变量传递给主机?

Java:java.lang.NoClassDefFoundError

java - 如何在运行时从 jar 加载工作目录中的 .class?

jquery - 显示加载微调器并阻止页面上的任何其他操作