I am using an open source library. I am only using a fraction of its functionality, and the library is huge (it drags in many other JARs from other OS projects). This is making my install file very large, and I need to cut it down.
If I take just the parts of the library I am actually using, is there any way to find out which of the other JAR files are still being used? It seems that a missing JAR at runtime might not be detected when the program runs up (is that correct?) but might result in a runtime error later on when Java tries to load the library.
Is there a more methodical way of doing this than just removing various JARs and checking if it still works?
Run app with -verbose:class - you can do this standalone or add parameter to JRE in the Java Control Panel
(also enable tracing and then check result trace file).
This option will list where each class is loaded from.