开发者

Indentify Needed/Uneeded Classes In JAR

I am distributing a Java application as a JAR but it depends on a few extra Apache libraries. All told the libraries increase the size of the JAR sixfold. I don't need the entire library and I want to remove anything that is not needed by my code.

Is there a way to identify the 开发者_Python百科classes that are needed? I could go through the source for all the classes I called and check their dependencies but that is just a pain considering the libraries are from 6 separate JARs.


You can use ProGuard to eliminate any unneeded classes within the distributed jars. You might need to customize the process to handle dependencies that cannot be discovered at compile time (e.g. due to reflection).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜