如何确定我的 Eclispe 项目实际需要 200 个链接的 JAR 中的哪一个?
我目前正在一个非常古老的 Java Eclipse 项目中工作,该项目有很多链接到其构建路径的 JAR。
我注意到其中有几个库不再被项目使用,这意味着随着代码多年来的发展,旧库已被遗忘。
确定该库是否已使用的标准方法是简单地将其删除并查看是否存在任何编译错误。
但是,我注意到构建路径中的某些库是通过反射调用的,这意味着如果我删除该库,我不会收到任何编译错误。但项目会因为找不到代码而崩溃。问题是你不知道什么时候会发生。
是否有一个工具可以用来确定我可以安全删除所有链接的 JAR 库中的哪些,而不会出现编译或反射错误?
I am currently working in an very old Java Eclipse project which has a lot of JARs linked to it's build path.
I have noticed that several of them aren't being used by the project any more, meaning old libraries that has been forgotten when the code has evolved over the years.
A standard way to determine if the library is used, is to simply remove it and see if there are any compilation errors.
However, I have noticed that some libraries in the build path are invoked by reflection, meaning if I remove the library I won't get any compilation errors. But the project will crash due to not finding the code anymore. Problem is you don't know when that can happen.
Is there a tool I can use to figure out which of all the linked JAR libraries I can safely remove, without getting compilation or reflection errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查ClassPathHelper。
Check ClassPathHelper.