开发者

find unused jar in project

I have 开发者_开发问答large project that have many unused jars in it, I want to remove that jars. I can't do it manually. How to find jars that are not used by project. I have tried classpathhelper but its not worthy for me, any other suggestion. I'm using eclipse.


Could you get Classpath Helper to work for you by increasing heap size of your Eclipse? See "Note Regarding Eclipse" on http://classpathhelper.sourceforge.net/.


Since you've said that the duplicate question isn't sufficient I'll offer a fairly odd idea to consider. It's not trivial, however neither is your problem if you have 500 jars. You could try using ProGuard on your application. You'll have to configure it to be aware of all entry points (main methods or servlets, etc), see their examples.

It can generate a single jar output that contains only the necessary classes from all of your dependency jars. From that you could cross reference every remaining class in that jar for which dependency jars you actually need. I'm not suggesting that you use the output from ProGuard, simply that you use it for filtering. You'd have to write a script or program to do this though. As I said, non-trivial :)


I came across this, hope it helps!

JarAnalyzer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜