大多数时候,开发人员将很难调试与类加载问题相关的问题,原因如下
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/