Reputation: 35843
For a .class
file, I would like to list all classes (fully qualified names) that are referenced, i.e. that are imported or otherwise used in the byte code (excluding undetectable things like reflection).
How could I achieve this through Java or command line?
Upvotes: 0
Views: 820
Reputation: 1175
use jdeps on command line. It is part of jdk.
jdeps -v class-name.class
-v option is used to get class level dependencies instead of default package level dependencies.
Upvotes: 2