How to figure out used JARs?
In a bigger project we might be using tons of JARs. How do I find out which JARs are being used by a certain m开发者_Python百科odule/package in the project (not the whole project). Any tool, technique, etc?
Bigger projects typically use a build tool like maven or ant. maven has the maven dependency plugin to list the dependencies for a particular project which you invoke by mvn dependency:list
. In case of ant, it depends on the way the build script is written.
Maybe you should give more details about your project environment and you may get better answers.
The various code obfuscators, reducers etc can help.
Check out:
http://jarg.sourceforge.net/
http://www.alphaworks.ibm.com/tech/jax/
http://www.e-t.com/jshrink.html
http://proguard.sourceforge.net/
http://www.fightingquaker.com/jaropt/
btw, this list was acquired from http://www.javakb.com/Uwe/Forum.aspx/java-programmer/34365/How-to-create-a-JAR-that-contains-only-the-class-files
精彩评论