如何确定应用程序中使用的JAR [英] How to Determine which JARs are Used in an Application

查看:121
本文介绍了如何确定应用程序中使用的JAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现有应用程序在其类路径中有大量JAR文件。有人必须最初添加所有JAR才能确定。一些JAR显然没有被使用,我们已经删除了一些不需要的JAR而没有造成任何问题。

An existing application has a ton of JAR files in its classpath. Someone must have added all JARs initially just to be sure. Some of the JARs were obviously not being used and we've already removed some of these unneeded JARs without causing any problems.

如何确定使用哪些JAR和哪些是不需要的(除了试错法)?

How does one determine which JARs are being used and which ones are unneeded (besides a trial and error method)?

推荐答案

Tattletale 是一个很好的工具。它适用于字节码,因此有可能通过反射使用某些类,并且不会出现在报告中。

Tattletale is a great tool for this. It works on the bytecode, so it is possible, that some classes are use via reflection and will not come up in the report.

这里链接不再有效)是一个示例报告。正如您所看到的,您只需要未使用的JAR 功能。

Here (link no longer works) is an example report. As you can see, you just have the feature you are looking for "Unused JAR".

这篇关于如何确定应用程序中使用的JAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆