A 150kb jar, usable either from code or from command line, to compute packages/classes cycles from class/jar files, and things around that (dependencies paths, strongly connected components, etc.):
https://github.com/jeffhain/jadecy
Designed to hunt down cycles and undesired dependencies, or to check them in unit tests.
Requires Java 5+ to run, not tested with Java 10+ class files formats.
Cf. screenshots for some command line output samples.
NB: You might want to use "-scycles" option rather than "-cycles", the former computing a set of (short) cycles covering all edges involved in cycles, while the later computes _all_ cycles, which can take ages if the code is a tangled mess (worse case in factorial(nbrOfVertices)).