In a bigger project we might be using tons of JARs. How do I find out which JARs are being used by a certain module/package in the project (not the whole project). Any tool, technique, etc?
Asked
Active
Viewed 729 times
3
-
possible dup: http://stackoverflow.com/questions/950642/how-to-analyse-which-jar-file-is-used-in-a-java-program – jmj Jan 19 '11 at 11:12
-
If you were to use Maven for dependency management, you could have a nice dependency graph with the Eclipse plugin – Robert Jan 19 '11 at 11:13
-
this question might also help... http://stackoverflow.com/questions/2179858/how-to-find-which-jars-and-in-what-order-are-loaded-by-a-classloader – Michael Wiles Jan 19 '11 at 11:59
2 Answers
2
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.

Raghuram
- 51,854
- 11
- 110
- 122
0
The various code obfuscators, reducers etc can help.
Check out:
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

Michael Wiles
- 20,902
- 18
- 71
- 101