Запуск Java с флагом подробный: класс
java -verbose:class com.package.Foo
Чтобы добавить его в файл:
java -verbose:class com.package.Foo > classes-used.txt
и т.д..
В нем также указан jar, в котором определены эти файлы:
Например, для этого класса
public class Test {
public static void main( String [] args ) {
}
}
У меня есть (среди прочих)
$ java -verbose:class Test
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar]
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ui.jar]
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/laf.jar]
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar]
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jce.jar]
[Opened /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/charsets.jar]
[Loaded java.lang.Object from shared objects file]
[Loaded java.io.Serializable from shared objects file]
[Loaded java.lang.Comparable from shared objects file]
[Loaded java.lang.CharSequence from shared objects file]
[Loaded java.lang.String from shared objects file]
[Loaded java.lang.reflect.GenericDeclaration from shared objects file]
[Loaded java.lang.reflect.Type from shared objects file]
[Loaded java.lang.reflect.AnnotatedElement from shared objects file]
[Loaded java.lang.Class from shared objects file]
[Loaded java.lang.Cloneable from shared objects file]
[Loaded java.lang.ClassLoader from shared objects file]
[Loaded java.lang.System from shared objects file]